From 4dcdcde7d5668519da9eb64a6f6ccb6310e2303a Mon Sep 17 00:00:00 2001 From: Kbz-8 Date: Fri, 12 Jan 2024 00:49:42 +0100 Subject: [PATCH 1/8] improving vsupp --- example/main.c | 3 +- src/platform/inputs.cpp | 4 +-- src/renderer/texts/font.h | 6 ++-- src/renderer/texts/text_manager.h | 4 +-- valgrind.supp | 46 ++++++++++++++++++++++++++----- 5 files changed, 48 insertions(+), 15 deletions(-) diff --git a/example/main.c b/example/main.c index de17d3c..317b0c9 100644 --- a/example/main.c +++ b/example/main.c @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/04 17:55:21 by maldavid #+# #+# */ -/* Updated: 2024/01/11 15:03:14 by maldavid ### ########.fr */ +/* Updated: 2024/01/11 20:09:56 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -30,6 +30,7 @@ int update(void *param) t_mlx *mlx; mlx = (t_mlx *)param; + mlx_set_font_scale(mlx->mlx, mlx->win, "default", 6.f); mlx_string_put(mlx->mlx, mlx->win, 160, 120, 0xFFFF2066, "this text should be hidden"); mlx_put_image_to_window(mlx->mlx, mlx->win, mlx->logo, 100, 100); mlx_put_image_to_window(mlx->mlx, mlx->win, mlx->img, 150, 60); diff --git a/src/platform/inputs.cpp b/src/platform/inputs.cpp index 412732a..a6de3a7 100644 --- a/src/platform/inputs.cpp +++ b/src/platform/inputs.cpp @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/05 16:30:19 by maldavid #+# #+# */ -/* Updated: 2024/01/10 18:31:13 by maldavid ### ########.fr */ +/* Updated: 2024/01/11 19:08:23 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -35,7 +35,7 @@ namespace mlx } uint32_t id = _event.window.windowID; - if(!_events_hooks.count(id)) + if(_events_hooks.find(id) == _events_hooks.end()) continue; auto& hooks = _events_hooks[id]; diff --git a/src/renderer/texts/font.h b/src/renderer/texts/font.h index d25c4b7..1b0ed40 100644 --- a/src/renderer/texts/font.h +++ b/src/renderer/texts/font.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/12/11 21:17:04 by kbz_8 #+# #+# */ -/* Updated: 2023/12/14 17:51:40 by maldavid ### ########.fr */ +/* Updated: 2024/01/11 20:08:55 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -31,8 +31,8 @@ namespace mlx inline float getScale() const noexcept { return _scale; } inline const std::array& getCharData() const { return _cdata; } inline const TextureAtlas& getAtlas() const noexcept { return _atlas; } - inline bool operator==(const Font& rhs) const { return rhs._name == _name; } - inline bool operator!=(const Font& rhs) const { return rhs._name != _name; } + inline bool operator==(const Font& rhs) const { return rhs._name == _name && rhs._scale == _scale; } + inline bool operator!=(const Font& rhs) const { return rhs._name != _name && rhs._scale != _scale; } ~Font(); private: diff --git a/src/renderer/texts/text_manager.h b/src/renderer/texts/text_manager.h index 93cfedb..d530868 100644 --- a/src/renderer/texts/text_manager.h +++ b/src/renderer/texts/text_manager.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/04/06 16:24:11 by maldavid #+# #+# */ -/* Updated: 2024/01/11 05:18:42 by maldavid ### ########.fr */ +/* Updated: 2024/01/11 18:48:01 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -32,7 +32,7 @@ namespace mlx void init(Renderer& renderer) noexcept; std::pair registerText(int x, int y, uint32_t color, std::string str); - inline void clear() { _text_descriptors.clear(); TextLibrary::get().clearLibrary(); } + inline void clear() { _text_descriptors.clear(); /*TextLibrary::get().clearLibrary();*/ } void loadFont(Renderer& renderer, const std::filesystem::path& filepath, float scale); void destroy() noexcept; diff --git a/valgrind.supp b/valgrind.supp index d746267..c0feb86 100644 --- a/valgrind.supp +++ b/valgrind.supp @@ -1,7 +1,31 @@ { name Memcheck:Leak - fun:*alloc + fun:* + ... + obj:*libmlx* + ... +} +{ + name + Memcheck:Cond + fun:* + ... + obj:*libmlx* + ... +} +{ + name + Memcheck:Value8 + fun:* + ... + obj:*libmlx* + ... +} +{ + name + Memcheck:Addr4 + fun:* ... obj:*libmlx* ... @@ -9,7 +33,7 @@ { name Memcheck:Leak - fun:*alloc + fun:* ... obj:*SDL* ... @@ -17,7 +41,7 @@ { name Memcheck:Leak - fun:*alloc + fun:* ... obj:*X11* ... @@ -25,7 +49,7 @@ { name Memcheck:Leak - fun:*alloc + fun:* ... obj:*nvidia.so* ... @@ -33,7 +57,7 @@ { name Memcheck:Leak - fun:*alloc + fun:* obj:* ... fun:X11* @@ -51,7 +75,16 @@ { name Memcheck:Leak - fun:*alloc + fun:* + obj:* + ... + fun:_dl_* + ... +} +{ + name + Memcheck:Leak + fun:* obj:* ... fun:dl_* @@ -94,4 +127,3 @@ obj:* obj:* } - From a2d40ce84410287fbafb195a603e07f2690847ac Mon Sep 17 00:00:00 2001 From: Namonay Date: Fri, 12 Jan 2024 01:27:02 +0100 Subject: [PATCH 2/8] Added protections to THE bridge --- src/core/bridge.cpp | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/src/core/bridge.cpp b/src/core/bridge.cpp index f2d947b..e847b15 100644 --- a/src/core/bridge.cpp +++ b/src/core/bridge.cpp @@ -47,6 +47,11 @@ extern "C" void* mlx_new_window(void* mlx, int w, int h, const char* title) { MLX_CHECK_APPLICATION_POINTER(mlx); + if(w <= 0 || h <= 0) + { + mlx::core::error::report(e_kind::fatal_error, "invalid window size (%d x %d)", w, h); + return NULL; // not nullptr for the C compatibility + } return static_cast(mlx)->newGraphicsSuport(w, h, title); } @@ -73,12 +78,14 @@ extern "C" int mlx_mouse_show() { - return SDL_ShowCursor(SDL_ENABLE); + SDL_ShowCursor(SDL_ENABLE); + return 0; } int mlx_mouse_hide() { - return SDL_ShowCursor(SDL_DISABLE); + SDL_ShowCursor(SDL_DISABLE); + return 0; } int mlx_mouse_move(void* mlx, void* win, int x, int y) @@ -105,6 +112,8 @@ extern "C" void* mlx_new_image(void* mlx, int width, int height) { MLX_CHECK_APPLICATION_POINTER(mlx); + if (width <= 0 || height <= 0) + mlx::core::error::report(e_kind::fatal_error, "invalid image size (%d x %d)", width, height); return static_cast(mlx)->newTexture(width, height); } @@ -142,6 +151,8 @@ extern "C" void* mlx_png_file_to_image(void* mlx, char* filename, int* width, int* height) { MLX_CHECK_APPLICATION_POINTER(mlx); + if (filename == nullptr) + mlx::core::error::report(e_kind::fatal_error, "PNG loader : filename is NULL"); std::filesystem::path file(filename); if(file.extension() != ".png") { @@ -154,6 +165,8 @@ extern "C" void* mlx_jpg_file_to_image(void* mlx, char* filename, int* width, int* height) { MLX_CHECK_APPLICATION_POINTER(mlx); + if (filename == nullptr) + mlx::core::error::report(e_kind::fatal_error, "JPG loader : filename is NULL"); std::filesystem::path file(filename); if(file.extension() != ".jpg" && file.extension() != ".jpeg") { @@ -166,6 +179,8 @@ extern "C" void* mlx_bmp_file_to_image(void* mlx, char* filename, int* width, int* height) { MLX_CHECK_APPLICATION_POINTER(mlx); + if (filename == nullptr) + mlx::core::error::report(e_kind::fatal_error, "BMP loader : filename is NULL"); std::filesystem::path file(filename); if(file.extension() != ".bmp" && file.extension() != ".dib") { @@ -202,6 +217,11 @@ extern "C" void mlx_set_font(void* mlx, void* win, char* filepath) { MLX_CHECK_APPLICATION_POINTER(mlx); + if (filepath == nullptr) + { + mlx::core::error::report(e_kind::error, "Font loader : filepath is NULL"); + return ; + } std::filesystem::path file(filepath); if(std::strcmp(filepath, "default") != 0 && file.extension() != ".ttf" && file.extension() != ".tte") { @@ -214,6 +234,11 @@ extern "C" void mlx_set_font_scale(void* mlx, void* win, char* filepath, float scale) { MLX_CHECK_APPLICATION_POINTER(mlx); + if (filepath == nullptr) + { + mlx::core::error::report(e_kind::error, "Font loader : filepath is NULL"); + return ; + } std::filesystem::path file(filepath); if(std::strcmp(filepath, "default") != 0 && file.extension() != ".ttf" && file.extension() != ".tte") { From 178690cff3a2de3a81c6b8b5c94908f57941d947 Mon Sep 17 00:00:00 2001 From: Namonay Date: Fri, 12 Jan 2024 04:24:24 +0100 Subject: [PATCH 3/8] Fixed mlx_mouse_move() not updating mouse position Removed SDL_FlushEvent(SDL_MOUSEMOTION) preventing Input::update() from catching new mouse position after a mlx_mouse_move() call --- src/core/application.inl | 1 - 1 file changed, 1 deletion(-) diff --git a/src/core/application.inl b/src/core/application.inl index c942efb..d25cb1d 100644 --- a/src/core/application.inl +++ b/src/core/application.inl @@ -42,7 +42,6 @@ namespace mlx::core } SDL_WarpMouseInWindow(_graphics[*static_cast(win)]->getWindow()->getNativeWindow(), x, y); SDL_PumpEvents(); - SDL_FlushEvent(SDL_MOUSEMOTION); } void Application::onEvent(void* win, int event, int (*funct_ptr)(int, void*), void* param) noexcept From 071bc4596ba3662ee9595e21804e4ebd4e05d7b6 Mon Sep 17 00:00:00 2001 From: Namonay Date: Fri, 12 Jan 2024 04:25:12 +0100 Subject: [PATCH 4/8] upgraded example to test all mlx functions --- example/42_logo.bmp | Bin 0 -> 30810 bytes example/42_logo.jpg | Bin 0 -> 1652 bytes example/build.sh | 2 +- example/main.c | 58 +++++++++++++++++++++++++++++++++++--------- 4 files changed, 48 insertions(+), 12 deletions(-) create mode 100644 example/42_logo.bmp create mode 100644 example/42_logo.jpg diff --git a/example/42_logo.bmp b/example/42_logo.bmp new file mode 100644 index 0000000000000000000000000000000000000000..299dacccce2f5beee18fdbccfeb97fa783553c30 GIT binary patch literal 30810 zcmeI5X-pMY6oBtTDs6$d6qUF%s1#9)T9?Me)F4Gk4I11cMT~`~AcoC{#F|u1w2j*j znpD%O(c)U8xUbQ;#AxEa#3&l;zD2FOxGVkMo8~fM;1vkA@4=b)hBIf*y>rjUz2}~p zx$>g=C48@3+f4R9@EQ5f$EJc^`cAn@ed2F?Tng8&SSjP5^QbtwcT~T;y+z>zwtd>@ z)1U6zx^(ICNlHpe7@xXx=g$4;tB(uogeT^8E-9~+F9!wGo$q64i)9l6LO=)z0U;m+ zgn$qb0zyCt2mv7=1cZPP5CTF#2nYcoAOwVf5D)@FKnMr{As_^VfDjM@Lcn_nOq(|C z#*G`^(_VKiy>{)IaoP|rU%q_e#0fM-MMeAe?R)a%3G)5>_usyKi*V}Hsq^R0Biy`s z^Y-oAC=m`GJoxV2JCtnKuU|K0YUAww{rl~9`_-#g!G#$b1Y?ge7rJxj&Z9?hXXj1CQWMBuHDd~Ll-Pq zfB`510|U9l*s)_9HEINkZr!@AUAuO~h!M%j$@AyWuUD_$l`B`0l9HA#T}m4oG-z<_ z*s*2HmU$2+S5x3{*W*sFUcKl8 z1}i#AP*Bi}88aqNo;+sEnDq4YhYue{L`2M*H479mF){Qdpuvj$*|TTkC&YR z9XjOa=TmC>^y!*a_wL=P0ajdk-n@BS$OBmg1O(8vph4RXA3jWXLI5D6>CmA=M~@!m z5Eov&c(G&04m7%7-Me@1^y$-^Hf=IH)v{$vs-i4r1qB5RTZR>tJbn6Lwr#s&#fpUs7xwJglLgac0%QdQ91sNu2Q#U)YSoIcykyCercIlsrlvM& z(gZRX5X{*FkUfKr_|MEZWy+L}9Xpb5Ftw2b5W~~b(h?IBnFPI*r9?(^1~sC1QDCqj=#f(4I>9biQJ}58;Tn;(U=5)CFv_yuH3b27lbEH zoY=K%SJDP%w?&H<)c{twFl5LOqU+0-FG-^6)~$Qt!i50?1~3`<`ufsCn8=vC$R#*S zXQSJYpu&dR-~cHZ`kKKC-+_ZKB+?{22qZtu z<3OWpk>|X6^@@2jH#fI_{rY4+7=RaUd-v{LzI=H?LIN{BIY4Y|Z2$iKIor2yU+l>c z#*ZJ*NaWDabIJoZ!iaU#c>+F?A69R(K}YBd4Gpc{YTtKl{FZ%ueCk*>5}WsZY5nVX z-xsQ``u|5()#bu}R*$f%IBH=ftSU~R;+Fr~uZ%2+M993AsVsGqTk$q{i{-zvii?Z0 zOpSXq! z3UWnQfs6lYtSc8*Zu%9h$R{-}Vdb8cG3t5dK<^S(6=4N2;|Y~F#`ga#UK#z$*z;V= z8(FPdwMvIvEiguSU}E;pjjV5Md0Ate3E`ab(O}nOrszqR4?dck{V6)kbXT_C;@0s>I+19RU!OzdH3cZVmpSlLK zP-AXw7>pY?ZZx}Q$jzEHs{$?_r(3IHFdC~qJhQh{wpFYyu=>bg3ZZH6sXvqv4W*vZ-@c%@$6>~GxTkldQRs3oj$ znb+>t_)PCAa|9WzuwT7;wZ>I@SP`FDGiJrbQbubcq3@ls*MqV4urj(wnQ1DazSLmU ztQfiAVzmavYa1(EW_hQzcdw7t5l~a<*q@uw^?H;jF71qw>^&BS+=fm9m9k5NXeLj6?no`OER+vYqm8$U*ke zNqnWOtpNFR2Mt6%>(nP3@?TCl)g`;W2sX$uc;MIg7KA<|)g&jIWcz4G1~y%>2_2b{ zN&P%4g*()x8M)&n3Fh-}$>oKPt6lUx_aHSEaU2 zQ!4mec9J8>b!q2+RrEf>PsH_kcFt0jd>4Te?hQKjb2Qz|T# Sx)aOs`$Gz7Zfvk5CDKy z4j@?uG_1oy&P4b}M*34UePcDLXZ!>7BmDio4JAS#5rBRN3?>DGA>b=O$V#t5R#8?? zcI7If&`5bC8l|qhVS}kXU=#>~ z0!iut)zu7At69DS4v~T(q@iF*AAnd}3=FO=5h>#Mp4?i?O^o)Z{@rrQG{ftJH>oL3ybnesahBGeSJhD^34b)Ax0|*M#9KX6PS$zRtgzfRSsQl{fAu zG{}!MVv!#W$G1cv z3t%~;fh^7ocPc`gI+zA~ag4$bCvaQbo~EYTBEcS~&)sLd+9liaF_k+a_Az{S)@L?7 z-{}rpA$ZgTO-jkJur_dO`MIL-{9YO?N-I6!s(4 zTgxTD(SS!Ie1g=<7XVa+gug0~1Bt zr&owmUA!Q=3+Qqt6d@l-m-k^-o8H4rD#J!9s5YXQz069&!+Eu)&;9CfpPILF&lI9U zG7K6{KJ62C40Ojw8M7N@Raz$0j-Q!Cp#RZSIpXZ2rseM>}l zo+xK5K;JCH#ub+dI%H2sJUci0NgViM8jGRp+sP=O*3HPhV4ummPOeYa(#_g=&RhQe zCgOM>yg)b_W&S7TvQ4tn+Y`;V=Px_u>rfHZ?IL4>JM5!x?dJLfsKc#>$Y@u!Oz&Va zWnHMOt{ zM*BreVf&;`!nD}AvWfQb?SVS9iD5)oOk>g5sXVx*w5xEwkHVN%*vU#T@TwXfCkLeq zXx@T%A=kq>TK7t+?9J`9^%S`;+{A0L8I&aGvS_HiV!}~cZZTKwBCbz+lN561rbzKX zYc;4cuS4VWB95J=5=@HZwz$Wh7x6~QN%-azZht|FQ!uk}lCEt(n=RJn3(W(L==&MJ z*i9CKGd;?5q!w!-N-8^u(>I_E>K$_nmX2xG?1;kdlkg8sUlb~g$E?yVS?K~;yj}~% z%&gOT++590DO9(%w`c6b*t#_Sd6nB!@zHh*;3C?(X|EkooKpf03I|%7K4^4FfYmlb{kL3Kd&+sO^gt^;WcL#SWR1}K EFK82>82|tP literal 0 HcmV?d00001 diff --git a/example/build.sh b/example/build.sh index 4405e9d..b332c18 100755 --- a/example/build.sh +++ b/example/build.sh @@ -7,6 +7,6 @@ fi if [ $(uname -s) = 'Darwin' ]; then clang main.c ../libmlx.dylib -L /opt/homebrew/lib -lSDL2 -g; else - clang main.c ../libmlx.so -lSDL2 -g; + clang main.c ../libmlx.so -lSDL2 -g -Wall -Wextra -Werror; fi diff --git a/example/main.c b/example/main.c index 317b0c9..ba08a41 100644 --- a/example/main.c +++ b/example/main.c @@ -18,7 +18,9 @@ typedef struct s_mlx { void *mlx; void *win; - void *logo; + void *logo_png; + void *logo_jpg; + void *logo_bmp; void *img; } t_mlx; @@ -32,7 +34,9 @@ int update(void *param) mlx = (t_mlx *)param; mlx_set_font_scale(mlx->mlx, mlx->win, "default", 6.f); mlx_string_put(mlx->mlx, mlx->win, 160, 120, 0xFFFF2066, "this text should be hidden"); - mlx_put_image_to_window(mlx->mlx, mlx->win, mlx->logo, 100, 100); + mlx_put_image_to_window(mlx->mlx, mlx->win, mlx->logo_png, 100, 100); + mlx_put_image_to_window(mlx->mlx, mlx->win, mlx->logo_jpg, 210, 150); + mlx_put_image_to_window(mlx->mlx, mlx->win, mlx->logo_bmp, 220, 40); mlx_put_image_to_window(mlx->mlx, mlx->win, mlx->img, 150, 60); if (i == 0) mlx_set_font_scale(mlx->mlx, mlx->win, "font.ttf", 16.f); @@ -83,8 +87,37 @@ void *create_image(t_mlx *mlx) int key_hook(int key, void *param) { - if (key == 41) - mlx_loop_end(((t_mlx *)param)->mlx); + int x; + int y; + + mlx_mouse_get_pos(((t_mlx *)param)->mlx, &x, &y); + switch (key) + { + case 41: // ESCAPE + mlx_loop_end(((t_mlx *)param)->mlx); + break; + case 22: // (S)how + mlx_mouse_show(); + break; + case 11: // (H)ide + mlx_mouse_hide(); + break; + case 6:// (C)lear + mlx_clear_window(((t_mlx *)param)->mlx, ((t_mlx *)param)->win); + break; + case 79: // RIGHT KEY + mlx_mouse_move(((t_mlx *)param)->mlx, ((t_mlx *)param)->win, x + 10, y); + break; + case 80: // LEFT KEY + mlx_mouse_move(((t_mlx *)param)->mlx, ((t_mlx *)param)->win, x - 10, y); + break; + case 81: // UP KEY + mlx_mouse_move(((t_mlx *)param)->mlx, ((t_mlx *)param)->win, x, y + 10); + break; + case 82:// DOWN KEY + mlx_mouse_move(((t_mlx *)param)->mlx, ((t_mlx *)param)->win, x, y - 10); + break; + } return (0); } @@ -95,28 +128,31 @@ int window_hook(int event, void *param) return (0); } -int main(int argc, char **argv) +int main(void) { t_mlx mlx; - void *img; int w; int h; - (void)argc; - (void)argv; mlx.mlx = mlx_init(); mlx.win = mlx_new_window(mlx.mlx, 400, 400, "My window"); mlx_on_event(mlx.mlx, mlx.win, MLX_KEYDOWN, key_hook, &mlx); mlx_on_event(mlx.mlx, mlx.win, MLX_WINDOW_EVENT, window_hook, &mlx); - mlx.logo = mlx_png_file_to_image(mlx.mlx, "42_logo.png", &w, &h); + mlx.logo_png = mlx_png_file_to_image(mlx.mlx, "42_logo.png", &w, &h); + mlx.logo_bmp = mlx_bmp_file_to_image(mlx.mlx, "42_logo.bmp", &w, &h); + mlx.logo_jpg = mlx_jpg_file_to_image(mlx.mlx, "42_logo.jpg", &w, &h); mlx_pixel_put(mlx.mlx, mlx.win, 200, 10, 0xFFFF00FF); - mlx_put_image_to_window(mlx.mlx, mlx.win, mlx.logo, 10, 190); + mlx_put_image_to_window(mlx.mlx, mlx.win, mlx.logo_png, 10, 190); mlx.img = create_image(&mlx); mlx_string_put(mlx.mlx, mlx.win, 20, 20, 0xFF0020FF, \ "that text will disappear"); mlx_loop_hook(mlx.mlx, update, &mlx); mlx_loop(mlx.mlx); - mlx_destroy_image(mlx.mlx, mlx.logo); + mlx_get_screens_size(mlx.mlx, &w, &h); + printf("screen size : %dx%d", w, h); + mlx_destroy_image(mlx.mlx, mlx.logo_png); + mlx_destroy_image(mlx.mlx, mlx.logo_jpg); + mlx_destroy_image(mlx.mlx, mlx.logo_bmp); mlx_destroy_image(mlx.mlx, mlx.img); mlx_destroy_window(mlx.mlx, mlx.win); mlx_destroy_display(mlx.mlx); From a832c3ca408affda9ed78434ef27e16ceba568d0 Mon Sep 17 00:00:00 2001 From: Kbz-8 Date: Tue, 16 Jan 2024 07:19:27 +0100 Subject: [PATCH 5/8] fixing issue with swapchain recreation --- .github/dependabot.yml | 0 .github/workflows/fetch_dependencies.yml | 0 .github/workflows/greetings.yml | 0 .github/workflows/linux_clang.yml | 0 .github/workflows/linux_gcc.yml | 0 .github/workflows/macos_x86.yml | 0 .github/workflows/windows.yml | 0 .gitignore | 0 CONTRIBUTING.md | 0 LICENSE | 0 Makefile | 0 README.md | 0 XMAKE_BUILD.md | 0 compile_commands.json | 0 example/42_logo.bmp | Bin example/42_logo.jpg | Bin example/42_logo.png | Bin example/font.ttf | Bin example/main.c | 177 +++++++++--------- includes/mlx.h | 0 includes/mlx_profile.h | 0 res/logo.png | Bin res/screenshot_test.png | Bin res/screenshot_test_windows.png | Bin scripts/fetch_dependencies.sh | 0 src/core/UUID.cpp | 0 src/core/UUID.h | 0 src/core/application.cpp | 0 src/core/application.h | 0 src/core/application.inl | 0 src/core/bridge.cpp | 0 src/core/errors.cpp | 0 src/core/errors.h | 0 src/core/graphics.cpp | 0 src/core/graphics.h | 0 src/core/graphics.inl | 0 src/core/memory.cpp | 0 src/core/memory.h | 0 src/core/profiler.cpp | 0 src/core/profiler.h | 0 src/platform/inputs.cpp | 0 src/platform/inputs.h | 0 src/platform/window.cpp | 0 src/platform/window.h | 0 src/renderer/buffers/vk_buffer.cpp | 0 src/renderer/buffers/vk_buffer.h | 0 src/renderer/buffers/vk_ibo.h | 0 src/renderer/buffers/vk_ubo.cpp | 0 src/renderer/buffers/vk_ubo.h | 0 src/renderer/buffers/vk_vbo.cpp | 0 src/renderer/buffers/vk_vbo.h | 0 src/renderer/command/cmd_manager.cpp | 0 src/renderer/command/cmd_manager.h | 0 .../command/single_time_cmd_manager.cpp | 0 .../command/single_time_cmd_manager.h | 0 src/renderer/command/vk_cmd_buffer.cpp | 0 src/renderer/command/vk_cmd_buffer.h | 0 src/renderer/command/vk_cmd_pool.cpp | 0 src/renderer/command/vk_cmd_pool.h | 0 src/renderer/core/cmd_resource.h | 0 src/renderer/core/drawable_resource.h | 0 src/renderer/core/memory.cpp | 0 src/renderer/core/memory.h | 0 src/renderer/core/render_core.cpp | 0 src/renderer/core/render_core.h | 0 src/renderer/core/vk_device.cpp | 0 src/renderer/core/vk_device.h | 0 src/renderer/core/vk_fence.cpp | 0 src/renderer/core/vk_fence.h | 0 src/renderer/core/vk_instance.cpp | 0 src/renderer/core/vk_instance.h | 0 src/renderer/core/vk_queues.cpp | 0 src/renderer/core/vk_queues.h | 0 src/renderer/core/vk_semaphore.cpp | 0 src/renderer/core/vk_semaphore.h | 0 src/renderer/core/vk_surface.cpp | 0 src/renderer/core/vk_surface.h | 0 src/renderer/core/vk_validation_layers.cpp | 0 src/renderer/core/vk_validation_layers.h | 0 .../descriptors/vk_descriptor_pool.cpp | 0 src/renderer/descriptors/vk_descriptor_pool.h | 0 .../descriptors/vk_descriptor_set.cpp | 0 src/renderer/descriptors/vk_descriptor_set.h | 0 .../descriptors/vk_descriptor_set_layout.cpp | 0 .../descriptors/vk_descriptor_set_layout.h | 0 src/renderer/images/texture.cpp | 0 src/renderer/images/texture.h | 0 src/renderer/images/texture_atlas.cpp | 0 src/renderer/images/texture_atlas.h | 0 src/renderer/images/texture_descriptor.h | 0 src/renderer/images/texture_manager.h | 0 src/renderer/images/vk_image.cpp | 0 src/renderer/images/vk_image.h | 0 src/renderer/pipeline/pipeline.cpp | 0 src/renderer/pipeline/pipeline.h | 0 src/renderer/pixel_put.cpp | 0 src/renderer/pixel_put.h | 0 src/renderer/renderer.cpp | 12 +- src/renderer/renderer.h | 0 src/renderer/renderpass/vk_framebuffer.cpp | 0 src/renderer/renderpass/vk_framebuffer.h | 0 src/renderer/renderpass/vk_render_pass.cpp | 0 src/renderer/renderpass/vk_render_pass.h | 0 src/renderer/swapchain/vk_swapchain.cpp | 0 src/renderer/swapchain/vk_swapchain.h | 0 src/renderer/texts/font.cpp | 0 src/renderer/texts/font.h | 0 src/renderer/texts/text.cpp | 0 src/renderer/texts/text.h | 0 src/renderer/texts/text_descriptor.cpp | 0 src/renderer/texts/text_descriptor.h | 0 src/renderer/texts/text_library.cpp | 0 src/renderer/texts/text_library.h | 0 src/renderer/texts/text_manager.cpp | 0 src/renderer/texts/text_manager.h | 0 src/utils/combine_hash.h | 0 src/utils/dogica_ttf.h | 0 src/utils/icon_mlx.h | 0 src/utils/non_copyable.h | 0 src/utils/singleton.h | 0 third_party/function.h | 0 third_party/glm/common.hpp | 0 third_party/glm/detail/_features.hpp | 0 third_party/glm/detail/_fixes.hpp | 0 third_party/glm/detail/_noise.hpp | 0 third_party/glm/detail/_swizzle.hpp | 0 third_party/glm/detail/_swizzle_func.hpp | 0 third_party/glm/detail/_vectorize.hpp | 0 third_party/glm/detail/compute_common.hpp | 0 .../glm/detail/compute_vector_relational.hpp | 0 third_party/glm/detail/func_common.inl | 0 third_party/glm/detail/func_common_simd.inl | 0 third_party/glm/detail/func_exponential.inl | 0 .../glm/detail/func_exponential_simd.inl | 0 third_party/glm/detail/func_geometric.inl | 0 .../glm/detail/func_geometric_simd.inl | 0 third_party/glm/detail/func_integer.inl | 0 third_party/glm/detail/func_integer_simd.inl | 0 third_party/glm/detail/func_matrix.inl | 0 third_party/glm/detail/func_matrix_simd.inl | 0 third_party/glm/detail/func_packing.inl | 0 third_party/glm/detail/func_packing_simd.inl | 0 third_party/glm/detail/func_trigonometric.inl | 0 .../glm/detail/func_trigonometric_simd.inl | 0 .../glm/detail/func_vector_relational.inl | 0 .../detail/func_vector_relational_simd.inl | 0 third_party/glm/detail/glm.cpp | 0 third_party/glm/detail/qualifier.hpp | 0 third_party/glm/detail/setup.hpp | 0 third_party/glm/detail/type_float.hpp | 0 third_party/glm/detail/type_half.hpp | 0 third_party/glm/detail/type_half.inl | 0 third_party/glm/detail/type_mat2x2.hpp | 0 third_party/glm/detail/type_mat2x2.inl | 0 third_party/glm/detail/type_mat2x3.hpp | 0 third_party/glm/detail/type_mat2x3.inl | 0 third_party/glm/detail/type_mat2x4.hpp | 0 third_party/glm/detail/type_mat2x4.inl | 0 third_party/glm/detail/type_mat3x2.hpp | 0 third_party/glm/detail/type_mat3x2.inl | 0 third_party/glm/detail/type_mat3x3.hpp | 0 third_party/glm/detail/type_mat3x3.inl | 0 third_party/glm/detail/type_mat3x4.hpp | 0 third_party/glm/detail/type_mat3x4.inl | 0 third_party/glm/detail/type_mat4x2.hpp | 0 third_party/glm/detail/type_mat4x2.inl | 0 third_party/glm/detail/type_mat4x3.hpp | 0 third_party/glm/detail/type_mat4x3.inl | 0 third_party/glm/detail/type_mat4x4.hpp | 0 third_party/glm/detail/type_mat4x4.inl | 0 third_party/glm/detail/type_mat4x4_simd.inl | 0 third_party/glm/detail/type_quat.hpp | 0 third_party/glm/detail/type_quat.inl | 0 third_party/glm/detail/type_quat_simd.inl | 0 third_party/glm/detail/type_vec1.hpp | 0 third_party/glm/detail/type_vec1.inl | 0 third_party/glm/detail/type_vec2.hpp | 0 third_party/glm/detail/type_vec2.inl | 0 third_party/glm/detail/type_vec3.hpp | 0 third_party/glm/detail/type_vec3.inl | 0 third_party/glm/detail/type_vec4.hpp | 0 third_party/glm/detail/type_vec4.inl | 0 third_party/glm/detail/type_vec4_simd.inl | 0 third_party/glm/exponential.hpp | 0 third_party/glm/ext.hpp | 0 third_party/glm/ext/matrix_clip_space.hpp | 0 third_party/glm/ext/matrix_clip_space.inl | 0 third_party/glm/ext/matrix_common.hpp | 0 third_party/glm/ext/matrix_common.inl | 0 third_party/glm/ext/matrix_double2x2.hpp | 0 .../glm/ext/matrix_double2x2_precision.hpp | 0 third_party/glm/ext/matrix_double2x3.hpp | 0 .../glm/ext/matrix_double2x3_precision.hpp | 0 third_party/glm/ext/matrix_double2x4.hpp | 0 .../glm/ext/matrix_double2x4_precision.hpp | 0 third_party/glm/ext/matrix_double3x2.hpp | 0 .../glm/ext/matrix_double3x2_precision.hpp | 0 third_party/glm/ext/matrix_double3x3.hpp | 0 .../glm/ext/matrix_double3x3_precision.hpp | 0 third_party/glm/ext/matrix_double3x4.hpp | 0 .../glm/ext/matrix_double3x4_precision.hpp | 0 third_party/glm/ext/matrix_double4x2.hpp | 0 .../glm/ext/matrix_double4x2_precision.hpp | 0 third_party/glm/ext/matrix_double4x3.hpp | 0 .../glm/ext/matrix_double4x3_precision.hpp | 0 third_party/glm/ext/matrix_double4x4.hpp | 0 .../glm/ext/matrix_double4x4_precision.hpp | 0 third_party/glm/ext/matrix_float2x2.hpp | 0 .../glm/ext/matrix_float2x2_precision.hpp | 0 third_party/glm/ext/matrix_float2x3.hpp | 0 .../glm/ext/matrix_float2x3_precision.hpp | 0 third_party/glm/ext/matrix_float2x4.hpp | 0 .../glm/ext/matrix_float2x4_precision.hpp | 0 third_party/glm/ext/matrix_float3x2.hpp | 0 .../glm/ext/matrix_float3x2_precision.hpp | 0 third_party/glm/ext/matrix_float3x3.hpp | 0 .../glm/ext/matrix_float3x3_precision.hpp | 0 third_party/glm/ext/matrix_float3x4.hpp | 0 .../glm/ext/matrix_float3x4_precision.hpp | 0 third_party/glm/ext/matrix_float4x2.hpp | 0 .../glm/ext/matrix_float4x2_precision.hpp | 0 third_party/glm/ext/matrix_float4x3.hpp | 0 .../glm/ext/matrix_float4x3_precision.hpp | 0 third_party/glm/ext/matrix_float4x4.hpp | 0 .../glm/ext/matrix_float4x4_precision.hpp | 0 third_party/glm/ext/matrix_projection.hpp | 0 third_party/glm/ext/matrix_projection.inl | 0 third_party/glm/ext/matrix_relational.hpp | 0 third_party/glm/ext/matrix_relational.inl | 0 third_party/glm/ext/matrix_transform.hpp | 0 third_party/glm/ext/matrix_transform.inl | 0 third_party/glm/ext/quaternion_common.hpp | 0 third_party/glm/ext/quaternion_common.inl | 0 .../glm/ext/quaternion_common_simd.inl | 0 third_party/glm/ext/quaternion_double.hpp | 0 .../glm/ext/quaternion_double_precision.hpp | 0 .../glm/ext/quaternion_exponential.hpp | 0 .../glm/ext/quaternion_exponential.inl | 0 third_party/glm/ext/quaternion_float.hpp | 0 .../glm/ext/quaternion_float_precision.hpp | 0 third_party/glm/ext/quaternion_geometric.hpp | 0 third_party/glm/ext/quaternion_geometric.inl | 0 third_party/glm/ext/quaternion_relational.hpp | 0 third_party/glm/ext/quaternion_relational.inl | 0 third_party/glm/ext/quaternion_transform.hpp | 0 third_party/glm/ext/quaternion_transform.inl | 0 .../glm/ext/quaternion_trigonometric.hpp | 0 .../glm/ext/quaternion_trigonometric.inl | 0 third_party/glm/ext/scalar_common.hpp | 0 third_party/glm/ext/scalar_common.inl | 0 third_party/glm/ext/scalar_constants.hpp | 0 third_party/glm/ext/scalar_constants.inl | 0 third_party/glm/ext/scalar_int_sized.hpp | 0 third_party/glm/ext/scalar_integer.hpp | 0 third_party/glm/ext/scalar_integer.inl | 0 third_party/glm/ext/scalar_relational.hpp | 0 third_party/glm/ext/scalar_relational.inl | 0 third_party/glm/ext/scalar_uint_sized.hpp | 0 third_party/glm/ext/scalar_ulp.hpp | 0 third_party/glm/ext/scalar_ulp.inl | 0 third_party/glm/ext/vector_bool1.hpp | 0 .../glm/ext/vector_bool1_precision.hpp | 0 third_party/glm/ext/vector_bool2.hpp | 0 .../glm/ext/vector_bool2_precision.hpp | 0 third_party/glm/ext/vector_bool3.hpp | 0 .../glm/ext/vector_bool3_precision.hpp | 0 third_party/glm/ext/vector_bool4.hpp | 0 .../glm/ext/vector_bool4_precision.hpp | 0 third_party/glm/ext/vector_common.hpp | 0 third_party/glm/ext/vector_common.inl | 0 third_party/glm/ext/vector_double1.hpp | 0 .../glm/ext/vector_double1_precision.hpp | 0 third_party/glm/ext/vector_double2.hpp | 0 .../glm/ext/vector_double2_precision.hpp | 0 third_party/glm/ext/vector_double3.hpp | 0 .../glm/ext/vector_double3_precision.hpp | 0 third_party/glm/ext/vector_double4.hpp | 0 .../glm/ext/vector_double4_precision.hpp | 0 third_party/glm/ext/vector_float1.hpp | 0 .../glm/ext/vector_float1_precision.hpp | 0 third_party/glm/ext/vector_float2.hpp | 0 .../glm/ext/vector_float2_precision.hpp | 0 third_party/glm/ext/vector_float3.hpp | 0 .../glm/ext/vector_float3_precision.hpp | 0 third_party/glm/ext/vector_float4.hpp | 0 .../glm/ext/vector_float4_precision.hpp | 0 third_party/glm/ext/vector_int1.hpp | 0 third_party/glm/ext/vector_int1_precision.hpp | 0 third_party/glm/ext/vector_int2.hpp | 0 third_party/glm/ext/vector_int2_precision.hpp | 0 third_party/glm/ext/vector_int3.hpp | 0 third_party/glm/ext/vector_int3_precision.hpp | 0 third_party/glm/ext/vector_int4.hpp | 0 third_party/glm/ext/vector_int4_precision.hpp | 0 third_party/glm/ext/vector_integer.hpp | 0 third_party/glm/ext/vector_integer.inl | 0 third_party/glm/ext/vector_relational.hpp | 0 third_party/glm/ext/vector_relational.inl | 0 third_party/glm/ext/vector_uint1.hpp | 0 .../glm/ext/vector_uint1_precision.hpp | 0 third_party/glm/ext/vector_uint2.hpp | 0 .../glm/ext/vector_uint2_precision.hpp | 0 third_party/glm/ext/vector_uint3.hpp | 0 .../glm/ext/vector_uint3_precision.hpp | 0 third_party/glm/ext/vector_uint4.hpp | 0 .../glm/ext/vector_uint4_precision.hpp | 0 third_party/glm/ext/vector_ulp.hpp | 0 third_party/glm/ext/vector_ulp.inl | 0 third_party/glm/fwd.hpp | 0 third_party/glm/geometric.hpp | 0 third_party/glm/glm.hpp | 0 third_party/glm/gtc/bitfield.hpp | 0 third_party/glm/gtc/bitfield.inl | 0 third_party/glm/gtc/color_space.hpp | 0 third_party/glm/gtc/color_space.inl | 0 third_party/glm/gtc/constants.hpp | 0 third_party/glm/gtc/constants.inl | 0 third_party/glm/gtc/epsilon.hpp | 0 third_party/glm/gtc/epsilon.inl | 0 third_party/glm/gtc/integer.hpp | 0 third_party/glm/gtc/integer.inl | 0 third_party/glm/gtc/matrix_access.hpp | 0 third_party/glm/gtc/matrix_access.inl | 0 third_party/glm/gtc/matrix_integer.hpp | 0 third_party/glm/gtc/matrix_inverse.hpp | 0 third_party/glm/gtc/matrix_inverse.inl | 0 third_party/glm/gtc/matrix_transform.hpp | 0 third_party/glm/gtc/matrix_transform.inl | 0 third_party/glm/gtc/noise.hpp | 0 third_party/glm/gtc/noise.inl | 0 third_party/glm/gtc/packing.hpp | 0 third_party/glm/gtc/packing.inl | 0 third_party/glm/gtc/quaternion.hpp | 0 third_party/glm/gtc/quaternion.inl | 0 third_party/glm/gtc/quaternion_simd.inl | 0 third_party/glm/gtc/random.hpp | 0 third_party/glm/gtc/random.inl | 0 third_party/glm/gtc/reciprocal.hpp | 0 third_party/glm/gtc/reciprocal.inl | 0 third_party/glm/gtc/round.hpp | 0 third_party/glm/gtc/round.inl | 0 third_party/glm/gtc/type_aligned.hpp | 0 third_party/glm/gtc/type_precision.hpp | 0 third_party/glm/gtc/type_precision.inl | 0 third_party/glm/gtc/type_ptr.hpp | 0 third_party/glm/gtc/type_ptr.inl | 0 third_party/glm/gtc/ulp.hpp | 0 third_party/glm/gtc/ulp.inl | 0 third_party/glm/gtc/vec1.hpp | 0 third_party/glm/gtx/associated_min_max.hpp | 0 third_party/glm/gtx/associated_min_max.inl | 0 third_party/glm/gtx/bit.hpp | 0 third_party/glm/gtx/bit.inl | 0 third_party/glm/gtx/closest_point.hpp | 0 third_party/glm/gtx/closest_point.inl | 0 third_party/glm/gtx/color_encoding.hpp | 0 third_party/glm/gtx/color_encoding.inl | 0 third_party/glm/gtx/color_space.hpp | 0 third_party/glm/gtx/color_space.inl | 0 third_party/glm/gtx/color_space_YCoCg.hpp | 0 third_party/glm/gtx/color_space_YCoCg.inl | 0 third_party/glm/gtx/common.hpp | 0 third_party/glm/gtx/common.inl | 0 third_party/glm/gtx/compatibility.hpp | 0 third_party/glm/gtx/compatibility.inl | 0 third_party/glm/gtx/component_wise.hpp | 0 third_party/glm/gtx/component_wise.inl | 0 third_party/glm/gtx/dual_quaternion.hpp | 0 third_party/glm/gtx/dual_quaternion.inl | 0 third_party/glm/gtx/easing.hpp | 0 third_party/glm/gtx/easing.inl | 0 third_party/glm/gtx/euler_angles.hpp | 0 third_party/glm/gtx/euler_angles.inl | 0 third_party/glm/gtx/extend.hpp | 0 third_party/glm/gtx/extend.inl | 0 third_party/glm/gtx/extended_min_max.hpp | 0 third_party/glm/gtx/extended_min_max.inl | 0 third_party/glm/gtx/exterior_product.hpp | 0 third_party/glm/gtx/exterior_product.inl | 0 third_party/glm/gtx/fast_exponential.hpp | 0 third_party/glm/gtx/fast_exponential.inl | 0 third_party/glm/gtx/fast_square_root.hpp | 0 third_party/glm/gtx/fast_square_root.inl | 0 third_party/glm/gtx/fast_trigonometry.hpp | 0 third_party/glm/gtx/fast_trigonometry.inl | 0 third_party/glm/gtx/float_notmalize.inl | 0 third_party/glm/gtx/functions.hpp | 0 third_party/glm/gtx/functions.inl | 0 third_party/glm/gtx/gradient_paint.hpp | 0 third_party/glm/gtx/gradient_paint.inl | 0 .../glm/gtx/handed_coordinate_space.hpp | 0 .../glm/gtx/handed_coordinate_space.inl | 0 third_party/glm/gtx/hash.hpp | 0 third_party/glm/gtx/hash.inl | 0 third_party/glm/gtx/integer.hpp | 0 third_party/glm/gtx/integer.inl | 0 third_party/glm/gtx/intersect.hpp | 0 third_party/glm/gtx/intersect.inl | 0 third_party/glm/gtx/io.hpp | 0 third_party/glm/gtx/io.inl | 0 third_party/glm/gtx/log_base.hpp | 0 third_party/glm/gtx/log_base.inl | 0 third_party/glm/gtx/matrix_cross_product.hpp | 0 third_party/glm/gtx/matrix_cross_product.inl | 0 third_party/glm/gtx/matrix_decompose.hpp | 0 third_party/glm/gtx/matrix_decompose.inl | 0 third_party/glm/gtx/matrix_factorisation.hpp | 0 third_party/glm/gtx/matrix_factorisation.inl | 0 third_party/glm/gtx/matrix_interpolation.hpp | 0 third_party/glm/gtx/matrix_interpolation.inl | 0 third_party/glm/gtx/matrix_major_storage.hpp | 0 third_party/glm/gtx/matrix_major_storage.inl | 0 third_party/glm/gtx/matrix_operation.hpp | 0 third_party/glm/gtx/matrix_operation.inl | 0 third_party/glm/gtx/matrix_query.hpp | 0 third_party/glm/gtx/matrix_query.inl | 0 third_party/glm/gtx/matrix_transform_2d.hpp | 0 third_party/glm/gtx/matrix_transform_2d.inl | 0 third_party/glm/gtx/mixed_product.hpp | 0 third_party/glm/gtx/mixed_product.inl | 0 third_party/glm/gtx/norm.hpp | 0 third_party/glm/gtx/norm.inl | 0 third_party/glm/gtx/normal.hpp | 0 third_party/glm/gtx/normal.inl | 0 third_party/glm/gtx/normalize_dot.hpp | 0 third_party/glm/gtx/normalize_dot.inl | 0 third_party/glm/gtx/number_precision.hpp | 0 third_party/glm/gtx/number_precision.inl | 0 third_party/glm/gtx/optimum_pow.hpp | 0 third_party/glm/gtx/optimum_pow.inl | 0 third_party/glm/gtx/orthonormalize.hpp | 0 third_party/glm/gtx/orthonormalize.inl | 0 third_party/glm/gtx/perpendicular.hpp | 0 third_party/glm/gtx/perpendicular.inl | 0 third_party/glm/gtx/polar_coordinates.hpp | 0 third_party/glm/gtx/polar_coordinates.inl | 0 third_party/glm/gtx/projection.hpp | 0 third_party/glm/gtx/projection.inl | 0 third_party/glm/gtx/quaternion.hpp | 0 third_party/glm/gtx/quaternion.inl | 0 third_party/glm/gtx/range.hpp | 0 third_party/glm/gtx/raw_data.hpp | 0 third_party/glm/gtx/raw_data.inl | 0 .../glm/gtx/rotate_normalized_axis.hpp | 0 .../glm/gtx/rotate_normalized_axis.inl | 0 third_party/glm/gtx/rotate_vector.hpp | 0 third_party/glm/gtx/rotate_vector.inl | 0 third_party/glm/gtx/scalar_multiplication.hpp | 0 third_party/glm/gtx/scalar_relational.hpp | 0 third_party/glm/gtx/scalar_relational.inl | 0 third_party/glm/gtx/spline.hpp | 0 third_party/glm/gtx/spline.inl | 0 third_party/glm/gtx/std_based_type.hpp | 0 third_party/glm/gtx/std_based_type.inl | 0 third_party/glm/gtx/string_cast.hpp | 0 third_party/glm/gtx/string_cast.inl | 0 third_party/glm/gtx/texture.hpp | 0 third_party/glm/gtx/texture.inl | 0 third_party/glm/gtx/transform.hpp | 0 third_party/glm/gtx/transform.inl | 0 third_party/glm/gtx/transform2.hpp | 0 third_party/glm/gtx/transform2.inl | 0 third_party/glm/gtx/type_aligned.hpp | 0 third_party/glm/gtx/type_aligned.inl | 0 third_party/glm/gtx/type_trait.hpp | 0 third_party/glm/gtx/type_trait.inl | 0 third_party/glm/gtx/vec_swizzle.hpp | 0 third_party/glm/gtx/vector_angle.hpp | 0 third_party/glm/gtx/vector_angle.inl | 0 third_party/glm/gtx/vector_query.hpp | 0 third_party/glm/gtx/vector_query.inl | 0 third_party/glm/gtx/wrap.hpp | 0 third_party/glm/gtx/wrap.inl | 0 third_party/glm/integer.hpp | 0 third_party/glm/mat2x2.hpp | 0 third_party/glm/mat2x3.hpp | 0 third_party/glm/mat2x4.hpp | 0 third_party/glm/mat3x2.hpp | 0 third_party/glm/mat3x3.hpp | 0 third_party/glm/mat3x4.hpp | 0 third_party/glm/mat4x2.hpp | 0 third_party/glm/mat4x3.hpp | 0 third_party/glm/mat4x4.hpp | 0 third_party/glm/matrix.hpp | 0 third_party/glm/packing.hpp | 0 third_party/glm/simd/common.h | 0 third_party/glm/simd/exponential.h | 0 third_party/glm/simd/geometric.h | 0 third_party/glm/simd/integer.h | 0 third_party/glm/simd/matrix.h | 0 third_party/glm/simd/neon.h | 0 third_party/glm/simd/packing.h | 0 third_party/glm/simd/platform.h | 0 third_party/glm/simd/trigonometric.h | 0 third_party/glm/simd/vector_relational.h | 0 third_party/glm/trigonometric.hpp | 0 third_party/glm/vec2.hpp | 0 third_party/glm/vec3.hpp | 0 third_party/glm/vec4.hpp | 0 third_party/glm/vector_relational.hpp | 0 third_party/stb_image.h | 0 third_party/stb_rect_pack.h | 0 third_party/stb_truetype.h | 0 .../vk_video/vulkan_video_codec_h264std.h | 0 .../vulkan_video_codec_h264std_decode.h | 0 .../vulkan_video_codec_h264std_encode.h | 0 .../vk_video/vulkan_video_codec_h265std.h | 0 .../vulkan_video_codec_h265std_decode.h | 0 .../vulkan_video_codec_h265std_encode.h | 0 .../vk_video/vulkan_video_codecs_common.h | 0 third_party/vma.h | 0 third_party/volk.c | 0 third_party/volk.h | 0 third_party/vulkan/vk_icd.h | 0 third_party/vulkan/vk_layer.h | 0 third_party/vulkan/vk_platform.h | 0 third_party/vulkan/vulkan.cppm | 0 third_party/vulkan/vulkan.h | 0 third_party/vulkan/vulkan.hpp | 0 third_party/vulkan/vulkan_android.h | 0 third_party/vulkan/vulkan_beta.h | 0 third_party/vulkan/vulkan_core.h | 0 third_party/vulkan/vulkan_directfb.h | 0 third_party/vulkan/vulkan_enums.hpp | 0 .../vulkan/vulkan_extension_inspection.hpp | 0 third_party/vulkan/vulkan_format_traits.hpp | 0 third_party/vulkan/vulkan_fuchsia.h | 0 third_party/vulkan/vulkan_funcs.hpp | 0 third_party/vulkan/vulkan_ggp.h | 0 third_party/vulkan/vulkan_handles.hpp | 0 third_party/vulkan/vulkan_hash.hpp | 0 third_party/vulkan/vulkan_hpp_macros.hpp | 0 third_party/vulkan/vulkan_ios.h | 0 third_party/vulkan/vulkan_macos.h | 0 third_party/vulkan/vulkan_metal.h | 0 third_party/vulkan/vulkan_raii.hpp | 0 third_party/vulkan/vulkan_screen.h | 0 third_party/vulkan/vulkan_shared.hpp | 0 .../vulkan/vulkan_static_assertions.hpp | 0 third_party/vulkan/vulkan_structs.hpp | 0 third_party/vulkan/vulkan_to_string.hpp | 0 third_party/vulkan/vulkan_vi.h | 0 third_party/vulkan/vulkan_video.hpp | 0 third_party/vulkan/vulkan_wayland.h | 0 third_party/vulkan/vulkan_win32.h | 0 third_party/vulkan/vulkan_xcb.h | 0 third_party/vulkan/vulkan_xlib.h | 0 third_party/vulkan/vulkan_xlib_xrandr.h | 0 valgrind.supp | 28 --- xmake.lua | 0 550 files changed, 102 insertions(+), 115 deletions(-) mode change 100644 => 100755 .github/dependabot.yml mode change 100644 => 100755 .github/workflows/fetch_dependencies.yml mode change 100644 => 100755 .github/workflows/greetings.yml mode change 100644 => 100755 .github/workflows/linux_clang.yml mode change 100644 => 100755 .github/workflows/linux_gcc.yml mode change 100644 => 100755 .github/workflows/macos_x86.yml mode change 100644 => 100755 .github/workflows/windows.yml mode change 100644 => 100755 .gitignore mode change 100644 => 100755 CONTRIBUTING.md mode change 100644 => 100755 LICENSE mode change 100644 => 100755 Makefile mode change 100644 => 100755 README.md mode change 100644 => 100755 XMAKE_BUILD.md mode change 100644 => 100755 compile_commands.json mode change 100644 => 100755 example/42_logo.bmp mode change 100644 => 100755 example/42_logo.jpg mode change 100644 => 100755 example/42_logo.png mode change 100644 => 100755 example/font.ttf mode change 100644 => 100755 example/main.c mode change 100644 => 100755 includes/mlx.h mode change 100644 => 100755 includes/mlx_profile.h mode change 100644 => 100755 res/logo.png mode change 100644 => 100755 res/screenshot_test.png mode change 100644 => 100755 res/screenshot_test_windows.png mode change 100644 => 100755 scripts/fetch_dependencies.sh mode change 100644 => 100755 src/core/UUID.cpp mode change 100644 => 100755 src/core/UUID.h mode change 100644 => 100755 src/core/application.cpp mode change 100644 => 100755 src/core/application.h mode change 100644 => 100755 src/core/application.inl mode change 100644 => 100755 src/core/bridge.cpp mode change 100644 => 100755 src/core/errors.cpp mode change 100644 => 100755 src/core/errors.h mode change 100644 => 100755 src/core/graphics.cpp mode change 100644 => 100755 src/core/graphics.h mode change 100644 => 100755 src/core/graphics.inl mode change 100644 => 100755 src/core/memory.cpp mode change 100644 => 100755 src/core/memory.h mode change 100644 => 100755 src/core/profiler.cpp mode change 100644 => 100755 src/core/profiler.h mode change 100644 => 100755 src/platform/inputs.cpp mode change 100644 => 100755 src/platform/inputs.h mode change 100644 => 100755 src/platform/window.cpp mode change 100644 => 100755 src/platform/window.h mode change 100644 => 100755 src/renderer/buffers/vk_buffer.cpp mode change 100644 => 100755 src/renderer/buffers/vk_buffer.h mode change 100644 => 100755 src/renderer/buffers/vk_ibo.h mode change 100644 => 100755 src/renderer/buffers/vk_ubo.cpp mode change 100644 => 100755 src/renderer/buffers/vk_ubo.h mode change 100644 => 100755 src/renderer/buffers/vk_vbo.cpp mode change 100644 => 100755 src/renderer/buffers/vk_vbo.h mode change 100644 => 100755 src/renderer/command/cmd_manager.cpp mode change 100644 => 100755 src/renderer/command/cmd_manager.h mode change 100644 => 100755 src/renderer/command/single_time_cmd_manager.cpp mode change 100644 => 100755 src/renderer/command/single_time_cmd_manager.h mode change 100644 => 100755 src/renderer/command/vk_cmd_buffer.cpp mode change 100644 => 100755 src/renderer/command/vk_cmd_buffer.h mode change 100644 => 100755 src/renderer/command/vk_cmd_pool.cpp mode change 100644 => 100755 src/renderer/command/vk_cmd_pool.h mode change 100644 => 100755 src/renderer/core/cmd_resource.h mode change 100644 => 100755 src/renderer/core/drawable_resource.h mode change 100644 => 100755 src/renderer/core/memory.cpp mode change 100644 => 100755 src/renderer/core/memory.h mode change 100644 => 100755 src/renderer/core/render_core.cpp mode change 100644 => 100755 src/renderer/core/render_core.h mode change 100644 => 100755 src/renderer/core/vk_device.cpp mode change 100644 => 100755 src/renderer/core/vk_device.h mode change 100644 => 100755 src/renderer/core/vk_fence.cpp mode change 100644 => 100755 src/renderer/core/vk_fence.h mode change 100644 => 100755 src/renderer/core/vk_instance.cpp mode change 100644 => 100755 src/renderer/core/vk_instance.h mode change 100644 => 100755 src/renderer/core/vk_queues.cpp mode change 100644 => 100755 src/renderer/core/vk_queues.h mode change 100644 => 100755 src/renderer/core/vk_semaphore.cpp mode change 100644 => 100755 src/renderer/core/vk_semaphore.h mode change 100644 => 100755 src/renderer/core/vk_surface.cpp mode change 100644 => 100755 src/renderer/core/vk_surface.h mode change 100644 => 100755 src/renderer/core/vk_validation_layers.cpp mode change 100644 => 100755 src/renderer/core/vk_validation_layers.h mode change 100644 => 100755 src/renderer/descriptors/vk_descriptor_pool.cpp mode change 100644 => 100755 src/renderer/descriptors/vk_descriptor_pool.h mode change 100644 => 100755 src/renderer/descriptors/vk_descriptor_set.cpp mode change 100644 => 100755 src/renderer/descriptors/vk_descriptor_set.h mode change 100644 => 100755 src/renderer/descriptors/vk_descriptor_set_layout.cpp mode change 100644 => 100755 src/renderer/descriptors/vk_descriptor_set_layout.h mode change 100644 => 100755 src/renderer/images/texture.cpp mode change 100644 => 100755 src/renderer/images/texture.h mode change 100644 => 100755 src/renderer/images/texture_atlas.cpp mode change 100644 => 100755 src/renderer/images/texture_atlas.h mode change 100644 => 100755 src/renderer/images/texture_descriptor.h mode change 100644 => 100755 src/renderer/images/texture_manager.h mode change 100644 => 100755 src/renderer/images/vk_image.cpp mode change 100644 => 100755 src/renderer/images/vk_image.h mode change 100644 => 100755 src/renderer/pipeline/pipeline.cpp mode change 100644 => 100755 src/renderer/pipeline/pipeline.h mode change 100644 => 100755 src/renderer/pixel_put.cpp mode change 100644 => 100755 src/renderer/pixel_put.h mode change 100644 => 100755 src/renderer/renderer.cpp mode change 100644 => 100755 src/renderer/renderer.h mode change 100644 => 100755 src/renderer/renderpass/vk_framebuffer.cpp mode change 100644 => 100755 src/renderer/renderpass/vk_framebuffer.h mode change 100644 => 100755 src/renderer/renderpass/vk_render_pass.cpp mode change 100644 => 100755 src/renderer/renderpass/vk_render_pass.h mode change 100644 => 100755 src/renderer/swapchain/vk_swapchain.cpp mode change 100644 => 100755 src/renderer/swapchain/vk_swapchain.h mode change 100644 => 100755 src/renderer/texts/font.cpp mode change 100644 => 100755 src/renderer/texts/font.h mode change 100644 => 100755 src/renderer/texts/text.cpp mode change 100644 => 100755 src/renderer/texts/text.h mode change 100644 => 100755 src/renderer/texts/text_descriptor.cpp mode change 100644 => 100755 src/renderer/texts/text_descriptor.h mode change 100644 => 100755 src/renderer/texts/text_library.cpp mode change 100644 => 100755 src/renderer/texts/text_library.h mode change 100644 => 100755 src/renderer/texts/text_manager.cpp mode change 100644 => 100755 src/renderer/texts/text_manager.h mode change 100644 => 100755 src/utils/combine_hash.h mode change 100644 => 100755 src/utils/dogica_ttf.h mode change 100644 => 100755 src/utils/icon_mlx.h mode change 100644 => 100755 src/utils/non_copyable.h mode change 100644 => 100755 src/utils/singleton.h mode change 100644 => 100755 third_party/function.h mode change 100644 => 100755 third_party/glm/common.hpp mode change 100644 => 100755 third_party/glm/detail/_features.hpp mode change 100644 => 100755 third_party/glm/detail/_fixes.hpp mode change 100644 => 100755 third_party/glm/detail/_noise.hpp mode change 100644 => 100755 third_party/glm/detail/_swizzle.hpp mode change 100644 => 100755 third_party/glm/detail/_swizzle_func.hpp mode change 100644 => 100755 third_party/glm/detail/_vectorize.hpp mode change 100644 => 100755 third_party/glm/detail/compute_common.hpp mode change 100644 => 100755 third_party/glm/detail/compute_vector_relational.hpp mode change 100644 => 100755 third_party/glm/detail/func_common.inl mode change 100644 => 100755 third_party/glm/detail/func_common_simd.inl mode change 100644 => 100755 third_party/glm/detail/func_exponential.inl mode change 100644 => 100755 third_party/glm/detail/func_exponential_simd.inl mode change 100644 => 100755 third_party/glm/detail/func_geometric.inl mode change 100644 => 100755 third_party/glm/detail/func_geometric_simd.inl mode change 100644 => 100755 third_party/glm/detail/func_integer.inl mode change 100644 => 100755 third_party/glm/detail/func_integer_simd.inl mode change 100644 => 100755 third_party/glm/detail/func_matrix.inl mode change 100644 => 100755 third_party/glm/detail/func_matrix_simd.inl mode change 100644 => 100755 third_party/glm/detail/func_packing.inl mode change 100644 => 100755 third_party/glm/detail/func_packing_simd.inl mode change 100644 => 100755 third_party/glm/detail/func_trigonometric.inl mode change 100644 => 100755 third_party/glm/detail/func_trigonometric_simd.inl mode change 100644 => 100755 third_party/glm/detail/func_vector_relational.inl mode change 100644 => 100755 third_party/glm/detail/func_vector_relational_simd.inl mode change 100644 => 100755 third_party/glm/detail/glm.cpp mode change 100644 => 100755 third_party/glm/detail/qualifier.hpp mode change 100644 => 100755 third_party/glm/detail/setup.hpp mode change 100644 => 100755 third_party/glm/detail/type_float.hpp mode change 100644 => 100755 third_party/glm/detail/type_half.hpp mode change 100644 => 100755 third_party/glm/detail/type_half.inl mode change 100644 => 100755 third_party/glm/detail/type_mat2x2.hpp mode change 100644 => 100755 third_party/glm/detail/type_mat2x2.inl mode change 100644 => 100755 third_party/glm/detail/type_mat2x3.hpp mode change 100644 => 100755 third_party/glm/detail/type_mat2x3.inl mode change 100644 => 100755 third_party/glm/detail/type_mat2x4.hpp mode change 100644 => 100755 third_party/glm/detail/type_mat2x4.inl mode change 100644 => 100755 third_party/glm/detail/type_mat3x2.hpp mode change 100644 => 100755 third_party/glm/detail/type_mat3x2.inl mode change 100644 => 100755 third_party/glm/detail/type_mat3x3.hpp mode change 100644 => 100755 third_party/glm/detail/type_mat3x3.inl mode change 100644 => 100755 third_party/glm/detail/type_mat3x4.hpp mode change 100644 => 100755 third_party/glm/detail/type_mat3x4.inl mode change 100644 => 100755 third_party/glm/detail/type_mat4x2.hpp mode change 100644 => 100755 third_party/glm/detail/type_mat4x2.inl mode change 100644 => 100755 third_party/glm/detail/type_mat4x3.hpp mode change 100644 => 100755 third_party/glm/detail/type_mat4x3.inl mode change 100644 => 100755 third_party/glm/detail/type_mat4x4.hpp mode change 100644 => 100755 third_party/glm/detail/type_mat4x4.inl mode change 100644 => 100755 third_party/glm/detail/type_mat4x4_simd.inl mode change 100644 => 100755 third_party/glm/detail/type_quat.hpp mode change 100644 => 100755 third_party/glm/detail/type_quat.inl mode change 100644 => 100755 third_party/glm/detail/type_quat_simd.inl mode change 100644 => 100755 third_party/glm/detail/type_vec1.hpp mode change 100644 => 100755 third_party/glm/detail/type_vec1.inl mode change 100644 => 100755 third_party/glm/detail/type_vec2.hpp mode change 100644 => 100755 third_party/glm/detail/type_vec2.inl mode change 100644 => 100755 third_party/glm/detail/type_vec3.hpp mode change 100644 => 100755 third_party/glm/detail/type_vec3.inl mode change 100644 => 100755 third_party/glm/detail/type_vec4.hpp mode change 100644 => 100755 third_party/glm/detail/type_vec4.inl mode change 100644 => 100755 third_party/glm/detail/type_vec4_simd.inl mode change 100644 => 100755 third_party/glm/exponential.hpp mode change 100644 => 100755 third_party/glm/ext.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_clip_space.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_clip_space.inl mode change 100644 => 100755 third_party/glm/ext/matrix_common.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_common.inl mode change 100644 => 100755 third_party/glm/ext/matrix_double2x2.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_double2x2_precision.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_double2x3.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_double2x3_precision.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_double2x4.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_double2x4_precision.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_double3x2.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_double3x2_precision.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_double3x3.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_double3x3_precision.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_double3x4.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_double3x4_precision.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_double4x2.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_double4x2_precision.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_double4x3.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_double4x3_precision.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_double4x4.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_double4x4_precision.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_float2x2.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_float2x2_precision.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_float2x3.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_float2x3_precision.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_float2x4.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_float2x4_precision.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_float3x2.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_float3x2_precision.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_float3x3.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_float3x3_precision.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_float3x4.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_float3x4_precision.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_float4x2.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_float4x2_precision.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_float4x3.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_float4x3_precision.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_float4x4.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_float4x4_precision.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_projection.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_projection.inl mode change 100644 => 100755 third_party/glm/ext/matrix_relational.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_relational.inl mode change 100644 => 100755 third_party/glm/ext/matrix_transform.hpp mode change 100644 => 100755 third_party/glm/ext/matrix_transform.inl mode change 100644 => 100755 third_party/glm/ext/quaternion_common.hpp mode change 100644 => 100755 third_party/glm/ext/quaternion_common.inl mode change 100644 => 100755 third_party/glm/ext/quaternion_common_simd.inl mode change 100644 => 100755 third_party/glm/ext/quaternion_double.hpp mode change 100644 => 100755 third_party/glm/ext/quaternion_double_precision.hpp mode change 100644 => 100755 third_party/glm/ext/quaternion_exponential.hpp mode change 100644 => 100755 third_party/glm/ext/quaternion_exponential.inl mode change 100644 => 100755 third_party/glm/ext/quaternion_float.hpp mode change 100644 => 100755 third_party/glm/ext/quaternion_float_precision.hpp mode change 100644 => 100755 third_party/glm/ext/quaternion_geometric.hpp mode change 100644 => 100755 third_party/glm/ext/quaternion_geometric.inl mode change 100644 => 100755 third_party/glm/ext/quaternion_relational.hpp mode change 100644 => 100755 third_party/glm/ext/quaternion_relational.inl mode change 100644 => 100755 third_party/glm/ext/quaternion_transform.hpp mode change 100644 => 100755 third_party/glm/ext/quaternion_transform.inl mode change 100644 => 100755 third_party/glm/ext/quaternion_trigonometric.hpp mode change 100644 => 100755 third_party/glm/ext/quaternion_trigonometric.inl mode change 100644 => 100755 third_party/glm/ext/scalar_common.hpp mode change 100644 => 100755 third_party/glm/ext/scalar_common.inl mode change 100644 => 100755 third_party/glm/ext/scalar_constants.hpp mode change 100644 => 100755 third_party/glm/ext/scalar_constants.inl mode change 100644 => 100755 third_party/glm/ext/scalar_int_sized.hpp mode change 100644 => 100755 third_party/glm/ext/scalar_integer.hpp mode change 100644 => 100755 third_party/glm/ext/scalar_integer.inl mode change 100644 => 100755 third_party/glm/ext/scalar_relational.hpp mode change 100644 => 100755 third_party/glm/ext/scalar_relational.inl mode change 100644 => 100755 third_party/glm/ext/scalar_uint_sized.hpp mode change 100644 => 100755 third_party/glm/ext/scalar_ulp.hpp mode change 100644 => 100755 third_party/glm/ext/scalar_ulp.inl mode change 100644 => 100755 third_party/glm/ext/vector_bool1.hpp mode change 100644 => 100755 third_party/glm/ext/vector_bool1_precision.hpp mode change 100644 => 100755 third_party/glm/ext/vector_bool2.hpp mode change 100644 => 100755 third_party/glm/ext/vector_bool2_precision.hpp mode change 100644 => 100755 third_party/glm/ext/vector_bool3.hpp mode change 100644 => 100755 third_party/glm/ext/vector_bool3_precision.hpp mode change 100644 => 100755 third_party/glm/ext/vector_bool4.hpp mode change 100644 => 100755 third_party/glm/ext/vector_bool4_precision.hpp mode change 100644 => 100755 third_party/glm/ext/vector_common.hpp mode change 100644 => 100755 third_party/glm/ext/vector_common.inl mode change 100644 => 100755 third_party/glm/ext/vector_double1.hpp mode change 100644 => 100755 third_party/glm/ext/vector_double1_precision.hpp mode change 100644 => 100755 third_party/glm/ext/vector_double2.hpp mode change 100644 => 100755 third_party/glm/ext/vector_double2_precision.hpp mode change 100644 => 100755 third_party/glm/ext/vector_double3.hpp mode change 100644 => 100755 third_party/glm/ext/vector_double3_precision.hpp mode change 100644 => 100755 third_party/glm/ext/vector_double4.hpp mode change 100644 => 100755 third_party/glm/ext/vector_double4_precision.hpp mode change 100644 => 100755 third_party/glm/ext/vector_float1.hpp mode change 100644 => 100755 third_party/glm/ext/vector_float1_precision.hpp mode change 100644 => 100755 third_party/glm/ext/vector_float2.hpp mode change 100644 => 100755 third_party/glm/ext/vector_float2_precision.hpp mode change 100644 => 100755 third_party/glm/ext/vector_float3.hpp mode change 100644 => 100755 third_party/glm/ext/vector_float3_precision.hpp mode change 100644 => 100755 third_party/glm/ext/vector_float4.hpp mode change 100644 => 100755 third_party/glm/ext/vector_float4_precision.hpp mode change 100644 => 100755 third_party/glm/ext/vector_int1.hpp mode change 100644 => 100755 third_party/glm/ext/vector_int1_precision.hpp mode change 100644 => 100755 third_party/glm/ext/vector_int2.hpp mode change 100644 => 100755 third_party/glm/ext/vector_int2_precision.hpp mode change 100644 => 100755 third_party/glm/ext/vector_int3.hpp mode change 100644 => 100755 third_party/glm/ext/vector_int3_precision.hpp mode change 100644 => 100755 third_party/glm/ext/vector_int4.hpp mode change 100644 => 100755 third_party/glm/ext/vector_int4_precision.hpp mode change 100644 => 100755 third_party/glm/ext/vector_integer.hpp mode change 100644 => 100755 third_party/glm/ext/vector_integer.inl mode change 100644 => 100755 third_party/glm/ext/vector_relational.hpp mode change 100644 => 100755 third_party/glm/ext/vector_relational.inl mode change 100644 => 100755 third_party/glm/ext/vector_uint1.hpp mode change 100644 => 100755 third_party/glm/ext/vector_uint1_precision.hpp mode change 100644 => 100755 third_party/glm/ext/vector_uint2.hpp mode change 100644 => 100755 third_party/glm/ext/vector_uint2_precision.hpp mode change 100644 => 100755 third_party/glm/ext/vector_uint3.hpp mode change 100644 => 100755 third_party/glm/ext/vector_uint3_precision.hpp mode change 100644 => 100755 third_party/glm/ext/vector_uint4.hpp mode change 100644 => 100755 third_party/glm/ext/vector_uint4_precision.hpp mode change 100644 => 100755 third_party/glm/ext/vector_ulp.hpp mode change 100644 => 100755 third_party/glm/ext/vector_ulp.inl mode change 100644 => 100755 third_party/glm/fwd.hpp mode change 100644 => 100755 third_party/glm/geometric.hpp mode change 100644 => 100755 third_party/glm/glm.hpp mode change 100644 => 100755 third_party/glm/gtc/bitfield.hpp mode change 100644 => 100755 third_party/glm/gtc/bitfield.inl mode change 100644 => 100755 third_party/glm/gtc/color_space.hpp mode change 100644 => 100755 third_party/glm/gtc/color_space.inl mode change 100644 => 100755 third_party/glm/gtc/constants.hpp mode change 100644 => 100755 third_party/glm/gtc/constants.inl mode change 100644 => 100755 third_party/glm/gtc/epsilon.hpp mode change 100644 => 100755 third_party/glm/gtc/epsilon.inl mode change 100644 => 100755 third_party/glm/gtc/integer.hpp mode change 100644 => 100755 third_party/glm/gtc/integer.inl mode change 100644 => 100755 third_party/glm/gtc/matrix_access.hpp mode change 100644 => 100755 third_party/glm/gtc/matrix_access.inl mode change 100644 => 100755 third_party/glm/gtc/matrix_integer.hpp mode change 100644 => 100755 third_party/glm/gtc/matrix_inverse.hpp mode change 100644 => 100755 third_party/glm/gtc/matrix_inverse.inl mode change 100644 => 100755 third_party/glm/gtc/matrix_transform.hpp mode change 100644 => 100755 third_party/glm/gtc/matrix_transform.inl mode change 100644 => 100755 third_party/glm/gtc/noise.hpp mode change 100644 => 100755 third_party/glm/gtc/noise.inl mode change 100644 => 100755 third_party/glm/gtc/packing.hpp mode change 100644 => 100755 third_party/glm/gtc/packing.inl mode change 100644 => 100755 third_party/glm/gtc/quaternion.hpp mode change 100644 => 100755 third_party/glm/gtc/quaternion.inl mode change 100644 => 100755 third_party/glm/gtc/quaternion_simd.inl mode change 100644 => 100755 third_party/glm/gtc/random.hpp mode change 100644 => 100755 third_party/glm/gtc/random.inl mode change 100644 => 100755 third_party/glm/gtc/reciprocal.hpp mode change 100644 => 100755 third_party/glm/gtc/reciprocal.inl mode change 100644 => 100755 third_party/glm/gtc/round.hpp mode change 100644 => 100755 third_party/glm/gtc/round.inl mode change 100644 => 100755 third_party/glm/gtc/type_aligned.hpp mode change 100644 => 100755 third_party/glm/gtc/type_precision.hpp mode change 100644 => 100755 third_party/glm/gtc/type_precision.inl mode change 100644 => 100755 third_party/glm/gtc/type_ptr.hpp mode change 100644 => 100755 third_party/glm/gtc/type_ptr.inl mode change 100644 => 100755 third_party/glm/gtc/ulp.hpp mode change 100644 => 100755 third_party/glm/gtc/ulp.inl mode change 100644 => 100755 third_party/glm/gtc/vec1.hpp mode change 100644 => 100755 third_party/glm/gtx/associated_min_max.hpp mode change 100644 => 100755 third_party/glm/gtx/associated_min_max.inl mode change 100644 => 100755 third_party/glm/gtx/bit.hpp mode change 100644 => 100755 third_party/glm/gtx/bit.inl mode change 100644 => 100755 third_party/glm/gtx/closest_point.hpp mode change 100644 => 100755 third_party/glm/gtx/closest_point.inl mode change 100644 => 100755 third_party/glm/gtx/color_encoding.hpp mode change 100644 => 100755 third_party/glm/gtx/color_encoding.inl mode change 100644 => 100755 third_party/glm/gtx/color_space.hpp mode change 100644 => 100755 third_party/glm/gtx/color_space.inl mode change 100644 => 100755 third_party/glm/gtx/color_space_YCoCg.hpp mode change 100644 => 100755 third_party/glm/gtx/color_space_YCoCg.inl mode change 100644 => 100755 third_party/glm/gtx/common.hpp mode change 100644 => 100755 third_party/glm/gtx/common.inl mode change 100644 => 100755 third_party/glm/gtx/compatibility.hpp mode change 100644 => 100755 third_party/glm/gtx/compatibility.inl mode change 100644 => 100755 third_party/glm/gtx/component_wise.hpp mode change 100644 => 100755 third_party/glm/gtx/component_wise.inl mode change 100644 => 100755 third_party/glm/gtx/dual_quaternion.hpp mode change 100644 => 100755 third_party/glm/gtx/dual_quaternion.inl mode change 100644 => 100755 third_party/glm/gtx/easing.hpp mode change 100644 => 100755 third_party/glm/gtx/easing.inl mode change 100644 => 100755 third_party/glm/gtx/euler_angles.hpp mode change 100644 => 100755 third_party/glm/gtx/euler_angles.inl mode change 100644 => 100755 third_party/glm/gtx/extend.hpp mode change 100644 => 100755 third_party/glm/gtx/extend.inl mode change 100644 => 100755 third_party/glm/gtx/extended_min_max.hpp mode change 100644 => 100755 third_party/glm/gtx/extended_min_max.inl mode change 100644 => 100755 third_party/glm/gtx/exterior_product.hpp mode change 100644 => 100755 third_party/glm/gtx/exterior_product.inl mode change 100644 => 100755 third_party/glm/gtx/fast_exponential.hpp mode change 100644 => 100755 third_party/glm/gtx/fast_exponential.inl mode change 100644 => 100755 third_party/glm/gtx/fast_square_root.hpp mode change 100644 => 100755 third_party/glm/gtx/fast_square_root.inl mode change 100644 => 100755 third_party/glm/gtx/fast_trigonometry.hpp mode change 100644 => 100755 third_party/glm/gtx/fast_trigonometry.inl mode change 100644 => 100755 third_party/glm/gtx/float_notmalize.inl mode change 100644 => 100755 third_party/glm/gtx/functions.hpp mode change 100644 => 100755 third_party/glm/gtx/functions.inl mode change 100644 => 100755 third_party/glm/gtx/gradient_paint.hpp mode change 100644 => 100755 third_party/glm/gtx/gradient_paint.inl mode change 100644 => 100755 third_party/glm/gtx/handed_coordinate_space.hpp mode change 100644 => 100755 third_party/glm/gtx/handed_coordinate_space.inl mode change 100644 => 100755 third_party/glm/gtx/hash.hpp mode change 100644 => 100755 third_party/glm/gtx/hash.inl mode change 100644 => 100755 third_party/glm/gtx/integer.hpp mode change 100644 => 100755 third_party/glm/gtx/integer.inl mode change 100644 => 100755 third_party/glm/gtx/intersect.hpp mode change 100644 => 100755 third_party/glm/gtx/intersect.inl mode change 100644 => 100755 third_party/glm/gtx/io.hpp mode change 100644 => 100755 third_party/glm/gtx/io.inl mode change 100644 => 100755 third_party/glm/gtx/log_base.hpp mode change 100644 => 100755 third_party/glm/gtx/log_base.inl mode change 100644 => 100755 third_party/glm/gtx/matrix_cross_product.hpp mode change 100644 => 100755 third_party/glm/gtx/matrix_cross_product.inl mode change 100644 => 100755 third_party/glm/gtx/matrix_decompose.hpp mode change 100644 => 100755 third_party/glm/gtx/matrix_decompose.inl mode change 100644 => 100755 third_party/glm/gtx/matrix_factorisation.hpp mode change 100644 => 100755 third_party/glm/gtx/matrix_factorisation.inl mode change 100644 => 100755 third_party/glm/gtx/matrix_interpolation.hpp mode change 100644 => 100755 third_party/glm/gtx/matrix_interpolation.inl mode change 100644 => 100755 third_party/glm/gtx/matrix_major_storage.hpp mode change 100644 => 100755 third_party/glm/gtx/matrix_major_storage.inl mode change 100644 => 100755 third_party/glm/gtx/matrix_operation.hpp mode change 100644 => 100755 third_party/glm/gtx/matrix_operation.inl mode change 100644 => 100755 third_party/glm/gtx/matrix_query.hpp mode change 100644 => 100755 third_party/glm/gtx/matrix_query.inl mode change 100644 => 100755 third_party/glm/gtx/matrix_transform_2d.hpp mode change 100644 => 100755 third_party/glm/gtx/matrix_transform_2d.inl mode change 100644 => 100755 third_party/glm/gtx/mixed_product.hpp mode change 100644 => 100755 third_party/glm/gtx/mixed_product.inl mode change 100644 => 100755 third_party/glm/gtx/norm.hpp mode change 100644 => 100755 third_party/glm/gtx/norm.inl mode change 100644 => 100755 third_party/glm/gtx/normal.hpp mode change 100644 => 100755 third_party/glm/gtx/normal.inl mode change 100644 => 100755 third_party/glm/gtx/normalize_dot.hpp mode change 100644 => 100755 third_party/glm/gtx/normalize_dot.inl mode change 100644 => 100755 third_party/glm/gtx/number_precision.hpp mode change 100644 => 100755 third_party/glm/gtx/number_precision.inl mode change 100644 => 100755 third_party/glm/gtx/optimum_pow.hpp mode change 100644 => 100755 third_party/glm/gtx/optimum_pow.inl mode change 100644 => 100755 third_party/glm/gtx/orthonormalize.hpp mode change 100644 => 100755 third_party/glm/gtx/orthonormalize.inl mode change 100644 => 100755 third_party/glm/gtx/perpendicular.hpp mode change 100644 => 100755 third_party/glm/gtx/perpendicular.inl mode change 100644 => 100755 third_party/glm/gtx/polar_coordinates.hpp mode change 100644 => 100755 third_party/glm/gtx/polar_coordinates.inl mode change 100644 => 100755 third_party/glm/gtx/projection.hpp mode change 100644 => 100755 third_party/glm/gtx/projection.inl mode change 100644 => 100755 third_party/glm/gtx/quaternion.hpp mode change 100644 => 100755 third_party/glm/gtx/quaternion.inl mode change 100644 => 100755 third_party/glm/gtx/range.hpp mode change 100644 => 100755 third_party/glm/gtx/raw_data.hpp mode change 100644 => 100755 third_party/glm/gtx/raw_data.inl mode change 100644 => 100755 third_party/glm/gtx/rotate_normalized_axis.hpp mode change 100644 => 100755 third_party/glm/gtx/rotate_normalized_axis.inl mode change 100644 => 100755 third_party/glm/gtx/rotate_vector.hpp mode change 100644 => 100755 third_party/glm/gtx/rotate_vector.inl mode change 100644 => 100755 third_party/glm/gtx/scalar_multiplication.hpp mode change 100644 => 100755 third_party/glm/gtx/scalar_relational.hpp mode change 100644 => 100755 third_party/glm/gtx/scalar_relational.inl mode change 100644 => 100755 third_party/glm/gtx/spline.hpp mode change 100644 => 100755 third_party/glm/gtx/spline.inl mode change 100644 => 100755 third_party/glm/gtx/std_based_type.hpp mode change 100644 => 100755 third_party/glm/gtx/std_based_type.inl mode change 100644 => 100755 third_party/glm/gtx/string_cast.hpp mode change 100644 => 100755 third_party/glm/gtx/string_cast.inl mode change 100644 => 100755 third_party/glm/gtx/texture.hpp mode change 100644 => 100755 third_party/glm/gtx/texture.inl mode change 100644 => 100755 third_party/glm/gtx/transform.hpp mode change 100644 => 100755 third_party/glm/gtx/transform.inl mode change 100644 => 100755 third_party/glm/gtx/transform2.hpp mode change 100644 => 100755 third_party/glm/gtx/transform2.inl mode change 100644 => 100755 third_party/glm/gtx/type_aligned.hpp mode change 100644 => 100755 third_party/glm/gtx/type_aligned.inl mode change 100644 => 100755 third_party/glm/gtx/type_trait.hpp mode change 100644 => 100755 third_party/glm/gtx/type_trait.inl mode change 100644 => 100755 third_party/glm/gtx/vec_swizzle.hpp mode change 100644 => 100755 third_party/glm/gtx/vector_angle.hpp mode change 100644 => 100755 third_party/glm/gtx/vector_angle.inl mode change 100644 => 100755 third_party/glm/gtx/vector_query.hpp mode change 100644 => 100755 third_party/glm/gtx/vector_query.inl mode change 100644 => 100755 third_party/glm/gtx/wrap.hpp mode change 100644 => 100755 third_party/glm/gtx/wrap.inl mode change 100644 => 100755 third_party/glm/integer.hpp mode change 100644 => 100755 third_party/glm/mat2x2.hpp mode change 100644 => 100755 third_party/glm/mat2x3.hpp mode change 100644 => 100755 third_party/glm/mat2x4.hpp mode change 100644 => 100755 third_party/glm/mat3x2.hpp mode change 100644 => 100755 third_party/glm/mat3x3.hpp mode change 100644 => 100755 third_party/glm/mat3x4.hpp mode change 100644 => 100755 third_party/glm/mat4x2.hpp mode change 100644 => 100755 third_party/glm/mat4x3.hpp mode change 100644 => 100755 third_party/glm/mat4x4.hpp mode change 100644 => 100755 third_party/glm/matrix.hpp mode change 100644 => 100755 third_party/glm/packing.hpp mode change 100644 => 100755 third_party/glm/simd/common.h mode change 100644 => 100755 third_party/glm/simd/exponential.h mode change 100644 => 100755 third_party/glm/simd/geometric.h mode change 100644 => 100755 third_party/glm/simd/integer.h mode change 100644 => 100755 third_party/glm/simd/matrix.h mode change 100644 => 100755 third_party/glm/simd/neon.h mode change 100644 => 100755 third_party/glm/simd/packing.h mode change 100644 => 100755 third_party/glm/simd/platform.h mode change 100644 => 100755 third_party/glm/simd/trigonometric.h mode change 100644 => 100755 third_party/glm/simd/vector_relational.h mode change 100644 => 100755 third_party/glm/trigonometric.hpp mode change 100644 => 100755 third_party/glm/vec2.hpp mode change 100644 => 100755 third_party/glm/vec3.hpp mode change 100644 => 100755 third_party/glm/vec4.hpp mode change 100644 => 100755 third_party/glm/vector_relational.hpp mode change 100644 => 100755 third_party/stb_image.h mode change 100644 => 100755 third_party/stb_rect_pack.h mode change 100644 => 100755 third_party/stb_truetype.h mode change 100644 => 100755 third_party/vk_video/vulkan_video_codec_h264std.h mode change 100644 => 100755 third_party/vk_video/vulkan_video_codec_h264std_decode.h mode change 100644 => 100755 third_party/vk_video/vulkan_video_codec_h264std_encode.h mode change 100644 => 100755 third_party/vk_video/vulkan_video_codec_h265std.h mode change 100644 => 100755 third_party/vk_video/vulkan_video_codec_h265std_decode.h mode change 100644 => 100755 third_party/vk_video/vulkan_video_codec_h265std_encode.h mode change 100644 => 100755 third_party/vk_video/vulkan_video_codecs_common.h mode change 100644 => 100755 third_party/vma.h mode change 100644 => 100755 third_party/volk.c mode change 100644 => 100755 third_party/volk.h mode change 100644 => 100755 third_party/vulkan/vk_icd.h mode change 100644 => 100755 third_party/vulkan/vk_layer.h mode change 100644 => 100755 third_party/vulkan/vk_platform.h mode change 100644 => 100755 third_party/vulkan/vulkan.cppm mode change 100644 => 100755 third_party/vulkan/vulkan.h mode change 100644 => 100755 third_party/vulkan/vulkan.hpp mode change 100644 => 100755 third_party/vulkan/vulkan_android.h mode change 100644 => 100755 third_party/vulkan/vulkan_beta.h mode change 100644 => 100755 third_party/vulkan/vulkan_core.h mode change 100644 => 100755 third_party/vulkan/vulkan_directfb.h mode change 100644 => 100755 third_party/vulkan/vulkan_enums.hpp mode change 100644 => 100755 third_party/vulkan/vulkan_extension_inspection.hpp mode change 100644 => 100755 third_party/vulkan/vulkan_format_traits.hpp mode change 100644 => 100755 third_party/vulkan/vulkan_fuchsia.h mode change 100644 => 100755 third_party/vulkan/vulkan_funcs.hpp mode change 100644 => 100755 third_party/vulkan/vulkan_ggp.h mode change 100644 => 100755 third_party/vulkan/vulkan_handles.hpp mode change 100644 => 100755 third_party/vulkan/vulkan_hash.hpp mode change 100644 => 100755 third_party/vulkan/vulkan_hpp_macros.hpp mode change 100644 => 100755 third_party/vulkan/vulkan_ios.h mode change 100644 => 100755 third_party/vulkan/vulkan_macos.h mode change 100644 => 100755 third_party/vulkan/vulkan_metal.h mode change 100644 => 100755 third_party/vulkan/vulkan_raii.hpp mode change 100644 => 100755 third_party/vulkan/vulkan_screen.h mode change 100644 => 100755 third_party/vulkan/vulkan_shared.hpp mode change 100644 => 100755 third_party/vulkan/vulkan_static_assertions.hpp mode change 100644 => 100755 third_party/vulkan/vulkan_structs.hpp mode change 100644 => 100755 third_party/vulkan/vulkan_to_string.hpp mode change 100644 => 100755 third_party/vulkan/vulkan_vi.h mode change 100644 => 100755 third_party/vulkan/vulkan_video.hpp mode change 100644 => 100755 third_party/vulkan/vulkan_wayland.h mode change 100644 => 100755 third_party/vulkan/vulkan_win32.h mode change 100644 => 100755 third_party/vulkan/vulkan_xcb.h mode change 100644 => 100755 third_party/vulkan/vulkan_xlib.h mode change 100644 => 100755 third_party/vulkan/vulkan_xlib_xrandr.h mode change 100644 => 100755 valgrind.supp mode change 100644 => 100755 xmake.lua diff --git a/.github/dependabot.yml b/.github/dependabot.yml old mode 100644 new mode 100755 diff --git a/.github/workflows/fetch_dependencies.yml b/.github/workflows/fetch_dependencies.yml old mode 100644 new mode 100755 diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml old mode 100644 new mode 100755 diff --git a/.github/workflows/linux_clang.yml b/.github/workflows/linux_clang.yml old mode 100644 new mode 100755 diff --git a/.github/workflows/linux_gcc.yml b/.github/workflows/linux_gcc.yml old mode 100644 new mode 100755 diff --git a/.github/workflows/macos_x86.yml b/.github/workflows/macos_x86.yml old mode 100644 new mode 100755 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml old mode 100644 new mode 100755 diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md old mode 100644 new mode 100755 diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/Makefile b/Makefile old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/XMAKE_BUILD.md b/XMAKE_BUILD.md old mode 100644 new mode 100755 diff --git a/compile_commands.json b/compile_commands.json old mode 100644 new mode 100755 diff --git a/example/42_logo.bmp b/example/42_logo.bmp old mode 100644 new mode 100755 diff --git a/example/42_logo.jpg b/example/42_logo.jpg old mode 100644 new mode 100755 diff --git a/example/42_logo.png b/example/42_logo.png old mode 100644 new mode 100755 diff --git a/example/font.ttf b/example/font.ttf old mode 100644 new mode 100755 diff --git a/example/main.c b/example/main.c old mode 100644 new mode 100755 index ba08a41..b579ecf --- a/example/main.c +++ b/example/main.c @@ -6,155 +6,160 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/04 17:55:21 by maldavid #+# #+# */ -/* Updated: 2024/01/11 20:09:56 by maldavid ### ########.fr */ +/* Updated: 2024/01/16 06:41:48 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ #include -#include #include "../includes/mlx.h" -typedef struct s_mlx +typedef struct { - void *mlx; - void *win; - void *logo_png; - void *logo_jpg; - void *logo_bmp; - void *img; -} t_mlx; + void* mlx; + void* win; + void* logo_png; + void* logo_jpg; + void* logo_bmp; + void* img; +} mlx_t; -int update(void *param) +int update(void* param) { - static int i = 0; - int j; - int k; - t_mlx *mlx; + static int i = 0; + mlx_t* mlx = (mlx_t*)param; - mlx = (t_mlx *)param; mlx_set_font_scale(mlx->mlx, mlx->win, "default", 6.f); mlx_string_put(mlx->mlx, mlx->win, 160, 120, 0xFFFF2066, "this text should be hidden"); + mlx_put_image_to_window(mlx->mlx, mlx->win, mlx->logo_png, 100, 100); mlx_put_image_to_window(mlx->mlx, mlx->win, mlx->logo_jpg, 210, 150); mlx_put_image_to_window(mlx->mlx, mlx->win, mlx->logo_bmp, 220, 40); mlx_put_image_to_window(mlx->mlx, mlx->win, mlx->img, 150, 60); - if (i == 0) - mlx_set_font_scale(mlx->mlx, mlx->win, "font.ttf", 16.f); + mlx_string_put(mlx->mlx, mlx->win, 20, 50, 0xFFFFFFFF, "that's a text"); - j = 0; - k = 0; - while (j++ < 400) + + int color = 0; + for(int j = 0; j < 400; j++) { - mlx_pixel_put(mlx->mlx, mlx->win, j, j, 0xFFFF0000 + k); + mlx_pixel_put(mlx->mlx, mlx->win, j, j, 0xFFFF0000 + color); mlx_pixel_put(mlx->mlx, mlx->win, 399 - j, j, 0xFF0000FF); - k += (k < 255); + color += (color < 255); } - if (++i == 5000) + + if(++i == 5000) mlx_clear_window(mlx->mlx, mlx->win); - if (i == 7000) + if(i == 7000) mlx_set_font_scale(mlx->mlx, mlx->win, "default", 16.f); - return (0); + + return 0; } -void *create_image(t_mlx *mlx) +void* create_image(mlx_t* mlx) { - unsigned char pixel[4]; - int i[3]; - void *img; - - memset(i, 0, sizeof(int) * 3); - img = mlx_new_image(mlx->mlx, 100, 100); - while (i[0] < (100 * 100) * 4) + unsigned char pixel[4]; + void* img = mlx_new_image(mlx->mlx, 100, 100); + for(int i = 0, j = 0, k = 0; i < (100 * 100) * 4; i += 4, j++) { - if (i[0] < 10000 || i[0] > 20000) + if(j >= 100) { - pixel[0] = i[0]; - pixel[1] = i[1]; - pixel[2] = i[2]; - pixel[3] = 0x99; - mlx_set_image_pixel(mlx->mlx, img, i[1], i[2], *((int *)pixel)); + j = 0; + k++; } - i[0] += 4; - i[1]++; - if (i[1] >= 100) + if(i < 10000 || i > 20000) { - i[1] = 0; - i[2]++; + pixel[0] = i; + pixel[1] = j; + pixel[2] = k; + pixel[3] = 0x99; + mlx_set_image_pixel(mlx->mlx, img, j, k, *((int *)pixel)); } } - return (img); + return img; } -int key_hook(int key, void *param) +int key_hook(int key, void* param) { int x; int y; + mlx_t* mlx = (mlx_t*)param; - mlx_mouse_get_pos(((t_mlx *)param)->mlx, &x, &y); - switch (key) + mlx_mouse_get_pos(mlx->mlx, &x, &y); + switch(key) { - case 41: // ESCAPE - mlx_loop_end(((t_mlx *)param)->mlx); - break; - case 22: // (S)how + case 41 : // ESCAPE + mlx_loop_end(mlx->mlx); + break; + case 22 : // (S)how mlx_mouse_show(); - break; - case 11: // (H)ide + break; + case 11 : // (H)ide mlx_mouse_hide(); - break; - case 6:// (C)lear - mlx_clear_window(((t_mlx *)param)->mlx, ((t_mlx *)param)->win); - break; - case 79: // RIGHT KEY - mlx_mouse_move(((t_mlx *)param)->mlx, ((t_mlx *)param)->win, x + 10, y); - break; - case 80: // LEFT KEY - mlx_mouse_move(((t_mlx *)param)->mlx, ((t_mlx *)param)->win, x - 10, y); - break; - case 81: // UP KEY - mlx_mouse_move(((t_mlx *)param)->mlx, ((t_mlx *)param)->win, x, y + 10); - break; - case 82:// DOWN KEY - mlx_mouse_move(((t_mlx *)param)->mlx, ((t_mlx *)param)->win, x, y - 10); - break; + break; + case 6 : // (C)lear + mlx_clear_window(mlx->mlx, mlx->win); + break; + case 79 : // RIGHT KEY + mlx_mouse_move(mlx->mlx, mlx->win, x + 10, y); + break; + case 80 : // LEFT KEY + mlx_mouse_move(mlx->mlx, mlx->win, x - 10, y); + break; + case 81 : // UP KEY + mlx_mouse_move(mlx->mlx, mlx->win, x, y + 10); + break; + case 82 : // DOWN KEY + mlx_mouse_move(mlx->mlx, mlx->win, x, y - 10); + break; + + default : break; } - return (0); + return 0; } -int window_hook(int event, void *param) +int window_hook(int event, void* param) { - if (event == 0) - mlx_loop_end(((t_mlx *)param)->mlx); - return (0); + if(event == 0) + mlx_loop_end(((mlx_t*)param)->mlx); + return 0; } -int main(void) +int main(void) { - t_mlx mlx; - int w; - int h; + mlx_t mlx; + int w; + int h; + int dummy; mlx.mlx = mlx_init(); mlx.win = mlx_new_window(mlx.mlx, 400, 400, "My window"); + mlx_on_event(mlx.mlx, mlx.win, MLX_KEYDOWN, key_hook, &mlx); mlx_on_event(mlx.mlx, mlx.win, MLX_WINDOW_EVENT, window_hook, &mlx); - mlx.logo_png = mlx_png_file_to_image(mlx.mlx, "42_logo.png", &w, &h); - mlx.logo_bmp = mlx_bmp_file_to_image(mlx.mlx, "42_logo.bmp", &w, &h); - mlx.logo_jpg = mlx_jpg_file_to_image(mlx.mlx, "42_logo.jpg", &w, &h); + + mlx.logo_png = mlx_png_file_to_image(mlx.mlx, "42_logo.png", &dummy, &dummy); + mlx.logo_bmp = mlx_bmp_file_to_image(mlx.mlx, "42_logo.bmp", &dummy, &dummy); + mlx.logo_jpg = mlx_jpg_file_to_image(mlx.mlx, "42_logo.jpg", &dummy, &dummy); + mlx_pixel_put(mlx.mlx, mlx.win, 200, 10, 0xFFFF00FF); mlx_put_image_to_window(mlx.mlx, mlx.win, mlx.logo_png, 10, 190); + mlx.img = create_image(&mlx); - mlx_string_put(mlx.mlx, mlx.win, 20, 20, 0xFF0020FF, \ - "that text will disappear"); + + mlx_string_put(mlx.mlx, mlx.win, 20, 20, 0xFF0020FF, "that text will disappear"); + mlx_set_font_scale(mlx.mlx, mlx.win, "font.ttf", 16.f); + mlx_loop_hook(mlx.mlx, update, &mlx); mlx_loop(mlx.mlx); + mlx_get_screens_size(mlx.mlx, &w, &h); printf("screen size : %dx%d", w, h); + mlx_destroy_image(mlx.mlx, mlx.logo_png); mlx_destroy_image(mlx.mlx, mlx.logo_jpg); mlx_destroy_image(mlx.mlx, mlx.logo_bmp); mlx_destroy_image(mlx.mlx, mlx.img); mlx_destroy_window(mlx.mlx, mlx.win); mlx_destroy_display(mlx.mlx); - return (0); + + return 0; } diff --git a/includes/mlx.h b/includes/mlx.h old mode 100644 new mode 100755 diff --git a/includes/mlx_profile.h b/includes/mlx_profile.h old mode 100644 new mode 100755 diff --git a/res/logo.png b/res/logo.png old mode 100644 new mode 100755 diff --git a/res/screenshot_test.png b/res/screenshot_test.png old mode 100644 new mode 100755 diff --git a/res/screenshot_test_windows.png b/res/screenshot_test_windows.png old mode 100644 new mode 100755 diff --git a/scripts/fetch_dependencies.sh b/scripts/fetch_dependencies.sh old mode 100644 new mode 100755 diff --git a/src/core/UUID.cpp b/src/core/UUID.cpp old mode 100644 new mode 100755 diff --git a/src/core/UUID.h b/src/core/UUID.h old mode 100644 new mode 100755 diff --git a/src/core/application.cpp b/src/core/application.cpp old mode 100644 new mode 100755 diff --git a/src/core/application.h b/src/core/application.h old mode 100644 new mode 100755 diff --git a/src/core/application.inl b/src/core/application.inl old mode 100644 new mode 100755 diff --git a/src/core/bridge.cpp b/src/core/bridge.cpp old mode 100644 new mode 100755 diff --git a/src/core/errors.cpp b/src/core/errors.cpp old mode 100644 new mode 100755 diff --git a/src/core/errors.h b/src/core/errors.h old mode 100644 new mode 100755 diff --git a/src/core/graphics.cpp b/src/core/graphics.cpp old mode 100644 new mode 100755 diff --git a/src/core/graphics.h b/src/core/graphics.h old mode 100644 new mode 100755 diff --git a/src/core/graphics.inl b/src/core/graphics.inl old mode 100644 new mode 100755 diff --git a/src/core/memory.cpp b/src/core/memory.cpp old mode 100644 new mode 100755 diff --git a/src/core/memory.h b/src/core/memory.h old mode 100644 new mode 100755 diff --git a/src/core/profiler.cpp b/src/core/profiler.cpp old mode 100644 new mode 100755 diff --git a/src/core/profiler.h b/src/core/profiler.h old mode 100644 new mode 100755 diff --git a/src/platform/inputs.cpp b/src/platform/inputs.cpp old mode 100644 new mode 100755 diff --git a/src/platform/inputs.h b/src/platform/inputs.h old mode 100644 new mode 100755 diff --git a/src/platform/window.cpp b/src/platform/window.cpp old mode 100644 new mode 100755 diff --git a/src/platform/window.h b/src/platform/window.h old mode 100644 new mode 100755 diff --git a/src/renderer/buffers/vk_buffer.cpp b/src/renderer/buffers/vk_buffer.cpp old mode 100644 new mode 100755 diff --git a/src/renderer/buffers/vk_buffer.h b/src/renderer/buffers/vk_buffer.h old mode 100644 new mode 100755 diff --git a/src/renderer/buffers/vk_ibo.h b/src/renderer/buffers/vk_ibo.h old mode 100644 new mode 100755 diff --git a/src/renderer/buffers/vk_ubo.cpp b/src/renderer/buffers/vk_ubo.cpp old mode 100644 new mode 100755 diff --git a/src/renderer/buffers/vk_ubo.h b/src/renderer/buffers/vk_ubo.h old mode 100644 new mode 100755 diff --git a/src/renderer/buffers/vk_vbo.cpp b/src/renderer/buffers/vk_vbo.cpp old mode 100644 new mode 100755 diff --git a/src/renderer/buffers/vk_vbo.h b/src/renderer/buffers/vk_vbo.h old mode 100644 new mode 100755 diff --git a/src/renderer/command/cmd_manager.cpp b/src/renderer/command/cmd_manager.cpp old mode 100644 new mode 100755 diff --git a/src/renderer/command/cmd_manager.h b/src/renderer/command/cmd_manager.h old mode 100644 new mode 100755 diff --git a/src/renderer/command/single_time_cmd_manager.cpp b/src/renderer/command/single_time_cmd_manager.cpp old mode 100644 new mode 100755 diff --git a/src/renderer/command/single_time_cmd_manager.h b/src/renderer/command/single_time_cmd_manager.h old mode 100644 new mode 100755 diff --git a/src/renderer/command/vk_cmd_buffer.cpp b/src/renderer/command/vk_cmd_buffer.cpp old mode 100644 new mode 100755 diff --git a/src/renderer/command/vk_cmd_buffer.h b/src/renderer/command/vk_cmd_buffer.h old mode 100644 new mode 100755 diff --git a/src/renderer/command/vk_cmd_pool.cpp b/src/renderer/command/vk_cmd_pool.cpp old mode 100644 new mode 100755 diff --git a/src/renderer/command/vk_cmd_pool.h b/src/renderer/command/vk_cmd_pool.h old mode 100644 new mode 100755 diff --git a/src/renderer/core/cmd_resource.h b/src/renderer/core/cmd_resource.h old mode 100644 new mode 100755 diff --git a/src/renderer/core/drawable_resource.h b/src/renderer/core/drawable_resource.h old mode 100644 new mode 100755 diff --git a/src/renderer/core/memory.cpp b/src/renderer/core/memory.cpp old mode 100644 new mode 100755 diff --git a/src/renderer/core/memory.h b/src/renderer/core/memory.h old mode 100644 new mode 100755 diff --git a/src/renderer/core/render_core.cpp b/src/renderer/core/render_core.cpp old mode 100644 new mode 100755 diff --git a/src/renderer/core/render_core.h b/src/renderer/core/render_core.h old mode 100644 new mode 100755 diff --git a/src/renderer/core/vk_device.cpp b/src/renderer/core/vk_device.cpp old mode 100644 new mode 100755 diff --git a/src/renderer/core/vk_device.h b/src/renderer/core/vk_device.h old mode 100644 new mode 100755 diff --git a/src/renderer/core/vk_fence.cpp b/src/renderer/core/vk_fence.cpp old mode 100644 new mode 100755 diff --git a/src/renderer/core/vk_fence.h b/src/renderer/core/vk_fence.h old mode 100644 new mode 100755 diff --git a/src/renderer/core/vk_instance.cpp b/src/renderer/core/vk_instance.cpp old mode 100644 new mode 100755 diff --git a/src/renderer/core/vk_instance.h b/src/renderer/core/vk_instance.h old mode 100644 new mode 100755 diff --git a/src/renderer/core/vk_queues.cpp b/src/renderer/core/vk_queues.cpp old mode 100644 new mode 100755 diff --git a/src/renderer/core/vk_queues.h b/src/renderer/core/vk_queues.h old mode 100644 new mode 100755 diff --git a/src/renderer/core/vk_semaphore.cpp b/src/renderer/core/vk_semaphore.cpp old mode 100644 new mode 100755 diff --git a/src/renderer/core/vk_semaphore.h b/src/renderer/core/vk_semaphore.h old mode 100644 new mode 100755 diff --git a/src/renderer/core/vk_surface.cpp b/src/renderer/core/vk_surface.cpp old mode 100644 new mode 100755 diff --git a/src/renderer/core/vk_surface.h b/src/renderer/core/vk_surface.h old mode 100644 new mode 100755 diff --git a/src/renderer/core/vk_validation_layers.cpp b/src/renderer/core/vk_validation_layers.cpp old mode 100644 new mode 100755 diff --git a/src/renderer/core/vk_validation_layers.h b/src/renderer/core/vk_validation_layers.h old mode 100644 new mode 100755 diff --git a/src/renderer/descriptors/vk_descriptor_pool.cpp b/src/renderer/descriptors/vk_descriptor_pool.cpp old mode 100644 new mode 100755 diff --git a/src/renderer/descriptors/vk_descriptor_pool.h b/src/renderer/descriptors/vk_descriptor_pool.h old mode 100644 new mode 100755 diff --git a/src/renderer/descriptors/vk_descriptor_set.cpp b/src/renderer/descriptors/vk_descriptor_set.cpp old mode 100644 new mode 100755 diff --git a/src/renderer/descriptors/vk_descriptor_set.h b/src/renderer/descriptors/vk_descriptor_set.h old mode 100644 new mode 100755 diff --git a/src/renderer/descriptors/vk_descriptor_set_layout.cpp b/src/renderer/descriptors/vk_descriptor_set_layout.cpp old mode 100644 new mode 100755 diff --git a/src/renderer/descriptors/vk_descriptor_set_layout.h b/src/renderer/descriptors/vk_descriptor_set_layout.h old mode 100644 new mode 100755 diff --git a/src/renderer/images/texture.cpp b/src/renderer/images/texture.cpp old mode 100644 new mode 100755 diff --git a/src/renderer/images/texture.h b/src/renderer/images/texture.h old mode 100644 new mode 100755 diff --git a/src/renderer/images/texture_atlas.cpp b/src/renderer/images/texture_atlas.cpp old mode 100644 new mode 100755 diff --git a/src/renderer/images/texture_atlas.h b/src/renderer/images/texture_atlas.h old mode 100644 new mode 100755 diff --git a/src/renderer/images/texture_descriptor.h b/src/renderer/images/texture_descriptor.h old mode 100644 new mode 100755 diff --git a/src/renderer/images/texture_manager.h b/src/renderer/images/texture_manager.h old mode 100644 new mode 100755 diff --git a/src/renderer/images/vk_image.cpp b/src/renderer/images/vk_image.cpp old mode 100644 new mode 100755 diff --git a/src/renderer/images/vk_image.h b/src/renderer/images/vk_image.h old mode 100644 new mode 100755 diff --git a/src/renderer/pipeline/pipeline.cpp b/src/renderer/pipeline/pipeline.cpp old mode 100644 new mode 100755 diff --git a/src/renderer/pipeline/pipeline.h b/src/renderer/pipeline/pipeline.h old mode 100644 new mode 100755 diff --git a/src/renderer/pixel_put.cpp b/src/renderer/pixel_put.cpp old mode 100644 new mode 100755 diff --git a/src/renderer/pixel_put.h b/src/renderer/pixel_put.h old mode 100644 new mode 100755 diff --git a/src/renderer/renderer.cpp b/src/renderer/renderer.cpp old mode 100644 new mode 100755 index 6cb8578..5666e72 --- a/src/renderer/renderer.cpp +++ b/src/renderer/renderer.cpp @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/12/18 17:25:16 by maldavid #+# #+# */ -/* Updated: 2024/01/10 14:18:35 by maldavid ### ########.fr */ +/* Updated: 2024/01/16 07:14:19 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -83,6 +83,11 @@ namespace mlx if(result == VK_ERROR_OUT_OF_DATE_KHR) { _swapchain.recreate(); + _pass.destroy(); + _pass.init(_swapchain.getImagesFormat(), VK_IMAGE_LAYOUT_PRESENT_SRC_KHR); + _framebuffers.clear(); + for(std::size_t i = 0; i < _swapchain.getImagesNumber(); i++) + _framebuffers.emplace_back().init(_pass, _swapchain.getImage(i)); return false; } else if(result != VK_SUCCESS && result != VK_SUBOPTIMAL_KHR) @@ -146,6 +151,11 @@ namespace mlx { _framebufferResized = false; _swapchain.recreate(); + _pass.destroy(); + _pass.init(_swapchain.getImagesFormat(), VK_IMAGE_LAYOUT_PRESENT_SRC_KHR); + _framebuffers.clear(); + for(std::size_t i = 0; i < _swapchain.getImagesNumber(); i++) + _framebuffers.emplace_back().init(_pass, _swapchain.getImage(i)); } else if(result != VK_SUCCESS) core::error::report(e_kind::fatal_error, "Vulkan error : failed to present swap chain image"); diff --git a/src/renderer/renderer.h b/src/renderer/renderer.h old mode 100644 new mode 100755 diff --git a/src/renderer/renderpass/vk_framebuffer.cpp b/src/renderer/renderpass/vk_framebuffer.cpp old mode 100644 new mode 100755 diff --git a/src/renderer/renderpass/vk_framebuffer.h b/src/renderer/renderpass/vk_framebuffer.h old mode 100644 new mode 100755 diff --git a/src/renderer/renderpass/vk_render_pass.cpp b/src/renderer/renderpass/vk_render_pass.cpp old mode 100644 new mode 100755 diff --git a/src/renderer/renderpass/vk_render_pass.h b/src/renderer/renderpass/vk_render_pass.h old mode 100644 new mode 100755 diff --git a/src/renderer/swapchain/vk_swapchain.cpp b/src/renderer/swapchain/vk_swapchain.cpp old mode 100644 new mode 100755 diff --git a/src/renderer/swapchain/vk_swapchain.h b/src/renderer/swapchain/vk_swapchain.h old mode 100644 new mode 100755 diff --git a/src/renderer/texts/font.cpp b/src/renderer/texts/font.cpp old mode 100644 new mode 100755 diff --git a/src/renderer/texts/font.h b/src/renderer/texts/font.h old mode 100644 new mode 100755 diff --git a/src/renderer/texts/text.cpp b/src/renderer/texts/text.cpp old mode 100644 new mode 100755 diff --git a/src/renderer/texts/text.h b/src/renderer/texts/text.h old mode 100644 new mode 100755 diff --git a/src/renderer/texts/text_descriptor.cpp b/src/renderer/texts/text_descriptor.cpp old mode 100644 new mode 100755 diff --git a/src/renderer/texts/text_descriptor.h b/src/renderer/texts/text_descriptor.h old mode 100644 new mode 100755 diff --git a/src/renderer/texts/text_library.cpp b/src/renderer/texts/text_library.cpp old mode 100644 new mode 100755 diff --git a/src/renderer/texts/text_library.h b/src/renderer/texts/text_library.h old mode 100644 new mode 100755 diff --git a/src/renderer/texts/text_manager.cpp b/src/renderer/texts/text_manager.cpp old mode 100644 new mode 100755 diff --git a/src/renderer/texts/text_manager.h b/src/renderer/texts/text_manager.h old mode 100644 new mode 100755 diff --git a/src/utils/combine_hash.h b/src/utils/combine_hash.h old mode 100644 new mode 100755 diff --git a/src/utils/dogica_ttf.h b/src/utils/dogica_ttf.h old mode 100644 new mode 100755 diff --git a/src/utils/icon_mlx.h b/src/utils/icon_mlx.h old mode 100644 new mode 100755 diff --git a/src/utils/non_copyable.h b/src/utils/non_copyable.h old mode 100644 new mode 100755 diff --git a/src/utils/singleton.h b/src/utils/singleton.h old mode 100644 new mode 100755 diff --git a/third_party/function.h b/third_party/function.h old mode 100644 new mode 100755 diff --git a/third_party/glm/common.hpp b/third_party/glm/common.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/_features.hpp b/third_party/glm/detail/_features.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/_fixes.hpp b/third_party/glm/detail/_fixes.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/_noise.hpp b/third_party/glm/detail/_noise.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/_swizzle.hpp b/third_party/glm/detail/_swizzle.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/_swizzle_func.hpp b/third_party/glm/detail/_swizzle_func.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/_vectorize.hpp b/third_party/glm/detail/_vectorize.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/compute_common.hpp b/third_party/glm/detail/compute_common.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/compute_vector_relational.hpp b/third_party/glm/detail/compute_vector_relational.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/func_common.inl b/third_party/glm/detail/func_common.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/func_common_simd.inl b/third_party/glm/detail/func_common_simd.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/func_exponential.inl b/third_party/glm/detail/func_exponential.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/func_exponential_simd.inl b/third_party/glm/detail/func_exponential_simd.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/func_geometric.inl b/third_party/glm/detail/func_geometric.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/func_geometric_simd.inl b/third_party/glm/detail/func_geometric_simd.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/func_integer.inl b/third_party/glm/detail/func_integer.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/func_integer_simd.inl b/third_party/glm/detail/func_integer_simd.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/func_matrix.inl b/third_party/glm/detail/func_matrix.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/func_matrix_simd.inl b/third_party/glm/detail/func_matrix_simd.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/func_packing.inl b/third_party/glm/detail/func_packing.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/func_packing_simd.inl b/third_party/glm/detail/func_packing_simd.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/func_trigonometric.inl b/third_party/glm/detail/func_trigonometric.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/func_trigonometric_simd.inl b/third_party/glm/detail/func_trigonometric_simd.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/func_vector_relational.inl b/third_party/glm/detail/func_vector_relational.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/func_vector_relational_simd.inl b/third_party/glm/detail/func_vector_relational_simd.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/glm.cpp b/third_party/glm/detail/glm.cpp old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/qualifier.hpp b/third_party/glm/detail/qualifier.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/setup.hpp b/third_party/glm/detail/setup.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/type_float.hpp b/third_party/glm/detail/type_float.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/type_half.hpp b/third_party/glm/detail/type_half.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/type_half.inl b/third_party/glm/detail/type_half.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/type_mat2x2.hpp b/third_party/glm/detail/type_mat2x2.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/type_mat2x2.inl b/third_party/glm/detail/type_mat2x2.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/type_mat2x3.hpp b/third_party/glm/detail/type_mat2x3.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/type_mat2x3.inl b/third_party/glm/detail/type_mat2x3.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/type_mat2x4.hpp b/third_party/glm/detail/type_mat2x4.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/type_mat2x4.inl b/third_party/glm/detail/type_mat2x4.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/type_mat3x2.hpp b/third_party/glm/detail/type_mat3x2.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/type_mat3x2.inl b/third_party/glm/detail/type_mat3x2.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/type_mat3x3.hpp b/third_party/glm/detail/type_mat3x3.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/type_mat3x3.inl b/third_party/glm/detail/type_mat3x3.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/type_mat3x4.hpp b/third_party/glm/detail/type_mat3x4.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/type_mat3x4.inl b/third_party/glm/detail/type_mat3x4.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/type_mat4x2.hpp b/third_party/glm/detail/type_mat4x2.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/type_mat4x2.inl b/third_party/glm/detail/type_mat4x2.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/type_mat4x3.hpp b/third_party/glm/detail/type_mat4x3.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/type_mat4x3.inl b/third_party/glm/detail/type_mat4x3.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/type_mat4x4.hpp b/third_party/glm/detail/type_mat4x4.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/type_mat4x4.inl b/third_party/glm/detail/type_mat4x4.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/type_mat4x4_simd.inl b/third_party/glm/detail/type_mat4x4_simd.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/type_quat.hpp b/third_party/glm/detail/type_quat.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/type_quat.inl b/third_party/glm/detail/type_quat.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/type_quat_simd.inl b/third_party/glm/detail/type_quat_simd.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/type_vec1.hpp b/third_party/glm/detail/type_vec1.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/type_vec1.inl b/third_party/glm/detail/type_vec1.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/type_vec2.hpp b/third_party/glm/detail/type_vec2.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/type_vec2.inl b/third_party/glm/detail/type_vec2.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/type_vec3.hpp b/third_party/glm/detail/type_vec3.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/type_vec3.inl b/third_party/glm/detail/type_vec3.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/type_vec4.hpp b/third_party/glm/detail/type_vec4.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/type_vec4.inl b/third_party/glm/detail/type_vec4.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/detail/type_vec4_simd.inl b/third_party/glm/detail/type_vec4_simd.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/exponential.hpp b/third_party/glm/exponential.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext.hpp b/third_party/glm/ext.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_clip_space.hpp b/third_party/glm/ext/matrix_clip_space.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_clip_space.inl b/third_party/glm/ext/matrix_clip_space.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_common.hpp b/third_party/glm/ext/matrix_common.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_common.inl b/third_party/glm/ext/matrix_common.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_double2x2.hpp b/third_party/glm/ext/matrix_double2x2.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_double2x2_precision.hpp b/third_party/glm/ext/matrix_double2x2_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_double2x3.hpp b/third_party/glm/ext/matrix_double2x3.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_double2x3_precision.hpp b/third_party/glm/ext/matrix_double2x3_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_double2x4.hpp b/third_party/glm/ext/matrix_double2x4.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_double2x4_precision.hpp b/third_party/glm/ext/matrix_double2x4_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_double3x2.hpp b/third_party/glm/ext/matrix_double3x2.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_double3x2_precision.hpp b/third_party/glm/ext/matrix_double3x2_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_double3x3.hpp b/third_party/glm/ext/matrix_double3x3.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_double3x3_precision.hpp b/third_party/glm/ext/matrix_double3x3_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_double3x4.hpp b/third_party/glm/ext/matrix_double3x4.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_double3x4_precision.hpp b/third_party/glm/ext/matrix_double3x4_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_double4x2.hpp b/third_party/glm/ext/matrix_double4x2.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_double4x2_precision.hpp b/third_party/glm/ext/matrix_double4x2_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_double4x3.hpp b/third_party/glm/ext/matrix_double4x3.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_double4x3_precision.hpp b/third_party/glm/ext/matrix_double4x3_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_double4x4.hpp b/third_party/glm/ext/matrix_double4x4.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_double4x4_precision.hpp b/third_party/glm/ext/matrix_double4x4_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_float2x2.hpp b/third_party/glm/ext/matrix_float2x2.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_float2x2_precision.hpp b/third_party/glm/ext/matrix_float2x2_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_float2x3.hpp b/third_party/glm/ext/matrix_float2x3.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_float2x3_precision.hpp b/third_party/glm/ext/matrix_float2x3_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_float2x4.hpp b/third_party/glm/ext/matrix_float2x4.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_float2x4_precision.hpp b/third_party/glm/ext/matrix_float2x4_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_float3x2.hpp b/third_party/glm/ext/matrix_float3x2.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_float3x2_precision.hpp b/third_party/glm/ext/matrix_float3x2_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_float3x3.hpp b/third_party/glm/ext/matrix_float3x3.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_float3x3_precision.hpp b/third_party/glm/ext/matrix_float3x3_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_float3x4.hpp b/third_party/glm/ext/matrix_float3x4.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_float3x4_precision.hpp b/third_party/glm/ext/matrix_float3x4_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_float4x2.hpp b/third_party/glm/ext/matrix_float4x2.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_float4x2_precision.hpp b/third_party/glm/ext/matrix_float4x2_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_float4x3.hpp b/third_party/glm/ext/matrix_float4x3.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_float4x3_precision.hpp b/third_party/glm/ext/matrix_float4x3_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_float4x4.hpp b/third_party/glm/ext/matrix_float4x4.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_float4x4_precision.hpp b/third_party/glm/ext/matrix_float4x4_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_projection.hpp b/third_party/glm/ext/matrix_projection.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_projection.inl b/third_party/glm/ext/matrix_projection.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_relational.hpp b/third_party/glm/ext/matrix_relational.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_relational.inl b/third_party/glm/ext/matrix_relational.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_transform.hpp b/third_party/glm/ext/matrix_transform.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/matrix_transform.inl b/third_party/glm/ext/matrix_transform.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/quaternion_common.hpp b/third_party/glm/ext/quaternion_common.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/quaternion_common.inl b/third_party/glm/ext/quaternion_common.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/quaternion_common_simd.inl b/third_party/glm/ext/quaternion_common_simd.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/quaternion_double.hpp b/third_party/glm/ext/quaternion_double.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/quaternion_double_precision.hpp b/third_party/glm/ext/quaternion_double_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/quaternion_exponential.hpp b/third_party/glm/ext/quaternion_exponential.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/quaternion_exponential.inl b/third_party/glm/ext/quaternion_exponential.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/quaternion_float.hpp b/third_party/glm/ext/quaternion_float.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/quaternion_float_precision.hpp b/third_party/glm/ext/quaternion_float_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/quaternion_geometric.hpp b/third_party/glm/ext/quaternion_geometric.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/quaternion_geometric.inl b/third_party/glm/ext/quaternion_geometric.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/quaternion_relational.hpp b/third_party/glm/ext/quaternion_relational.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/quaternion_relational.inl b/third_party/glm/ext/quaternion_relational.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/quaternion_transform.hpp b/third_party/glm/ext/quaternion_transform.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/quaternion_transform.inl b/third_party/glm/ext/quaternion_transform.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/quaternion_trigonometric.hpp b/third_party/glm/ext/quaternion_trigonometric.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/quaternion_trigonometric.inl b/third_party/glm/ext/quaternion_trigonometric.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/scalar_common.hpp b/third_party/glm/ext/scalar_common.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/scalar_common.inl b/third_party/glm/ext/scalar_common.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/scalar_constants.hpp b/third_party/glm/ext/scalar_constants.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/scalar_constants.inl b/third_party/glm/ext/scalar_constants.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/scalar_int_sized.hpp b/third_party/glm/ext/scalar_int_sized.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/scalar_integer.hpp b/third_party/glm/ext/scalar_integer.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/scalar_integer.inl b/third_party/glm/ext/scalar_integer.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/scalar_relational.hpp b/third_party/glm/ext/scalar_relational.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/scalar_relational.inl b/third_party/glm/ext/scalar_relational.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/scalar_uint_sized.hpp b/third_party/glm/ext/scalar_uint_sized.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/scalar_ulp.hpp b/third_party/glm/ext/scalar_ulp.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/scalar_ulp.inl b/third_party/glm/ext/scalar_ulp.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_bool1.hpp b/third_party/glm/ext/vector_bool1.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_bool1_precision.hpp b/third_party/glm/ext/vector_bool1_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_bool2.hpp b/third_party/glm/ext/vector_bool2.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_bool2_precision.hpp b/third_party/glm/ext/vector_bool2_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_bool3.hpp b/third_party/glm/ext/vector_bool3.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_bool3_precision.hpp b/third_party/glm/ext/vector_bool3_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_bool4.hpp b/third_party/glm/ext/vector_bool4.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_bool4_precision.hpp b/third_party/glm/ext/vector_bool4_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_common.hpp b/third_party/glm/ext/vector_common.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_common.inl b/third_party/glm/ext/vector_common.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_double1.hpp b/third_party/glm/ext/vector_double1.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_double1_precision.hpp b/third_party/glm/ext/vector_double1_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_double2.hpp b/third_party/glm/ext/vector_double2.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_double2_precision.hpp b/third_party/glm/ext/vector_double2_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_double3.hpp b/third_party/glm/ext/vector_double3.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_double3_precision.hpp b/third_party/glm/ext/vector_double3_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_double4.hpp b/third_party/glm/ext/vector_double4.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_double4_precision.hpp b/third_party/glm/ext/vector_double4_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_float1.hpp b/third_party/glm/ext/vector_float1.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_float1_precision.hpp b/third_party/glm/ext/vector_float1_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_float2.hpp b/third_party/glm/ext/vector_float2.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_float2_precision.hpp b/third_party/glm/ext/vector_float2_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_float3.hpp b/third_party/glm/ext/vector_float3.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_float3_precision.hpp b/third_party/glm/ext/vector_float3_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_float4.hpp b/third_party/glm/ext/vector_float4.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_float4_precision.hpp b/third_party/glm/ext/vector_float4_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_int1.hpp b/third_party/glm/ext/vector_int1.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_int1_precision.hpp b/third_party/glm/ext/vector_int1_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_int2.hpp b/third_party/glm/ext/vector_int2.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_int2_precision.hpp b/third_party/glm/ext/vector_int2_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_int3.hpp b/third_party/glm/ext/vector_int3.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_int3_precision.hpp b/third_party/glm/ext/vector_int3_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_int4.hpp b/third_party/glm/ext/vector_int4.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_int4_precision.hpp b/third_party/glm/ext/vector_int4_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_integer.hpp b/third_party/glm/ext/vector_integer.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_integer.inl b/third_party/glm/ext/vector_integer.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_relational.hpp b/third_party/glm/ext/vector_relational.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_relational.inl b/third_party/glm/ext/vector_relational.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_uint1.hpp b/third_party/glm/ext/vector_uint1.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_uint1_precision.hpp b/third_party/glm/ext/vector_uint1_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_uint2.hpp b/third_party/glm/ext/vector_uint2.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_uint2_precision.hpp b/third_party/glm/ext/vector_uint2_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_uint3.hpp b/third_party/glm/ext/vector_uint3.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_uint3_precision.hpp b/third_party/glm/ext/vector_uint3_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_uint4.hpp b/third_party/glm/ext/vector_uint4.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_uint4_precision.hpp b/third_party/glm/ext/vector_uint4_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_ulp.hpp b/third_party/glm/ext/vector_ulp.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/ext/vector_ulp.inl b/third_party/glm/ext/vector_ulp.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/fwd.hpp b/third_party/glm/fwd.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/geometric.hpp b/third_party/glm/geometric.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/glm.hpp b/third_party/glm/glm.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/bitfield.hpp b/third_party/glm/gtc/bitfield.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/bitfield.inl b/third_party/glm/gtc/bitfield.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/color_space.hpp b/third_party/glm/gtc/color_space.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/color_space.inl b/third_party/glm/gtc/color_space.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/constants.hpp b/third_party/glm/gtc/constants.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/constants.inl b/third_party/glm/gtc/constants.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/epsilon.hpp b/third_party/glm/gtc/epsilon.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/epsilon.inl b/third_party/glm/gtc/epsilon.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/integer.hpp b/third_party/glm/gtc/integer.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/integer.inl b/third_party/glm/gtc/integer.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/matrix_access.hpp b/third_party/glm/gtc/matrix_access.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/matrix_access.inl b/third_party/glm/gtc/matrix_access.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/matrix_integer.hpp b/third_party/glm/gtc/matrix_integer.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/matrix_inverse.hpp b/third_party/glm/gtc/matrix_inverse.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/matrix_inverse.inl b/third_party/glm/gtc/matrix_inverse.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/matrix_transform.hpp b/third_party/glm/gtc/matrix_transform.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/matrix_transform.inl b/third_party/glm/gtc/matrix_transform.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/noise.hpp b/third_party/glm/gtc/noise.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/noise.inl b/third_party/glm/gtc/noise.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/packing.hpp b/third_party/glm/gtc/packing.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/packing.inl b/third_party/glm/gtc/packing.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/quaternion.hpp b/third_party/glm/gtc/quaternion.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/quaternion.inl b/third_party/glm/gtc/quaternion.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/quaternion_simd.inl b/third_party/glm/gtc/quaternion_simd.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/random.hpp b/third_party/glm/gtc/random.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/random.inl b/third_party/glm/gtc/random.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/reciprocal.hpp b/third_party/glm/gtc/reciprocal.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/reciprocal.inl b/third_party/glm/gtc/reciprocal.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/round.hpp b/third_party/glm/gtc/round.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/round.inl b/third_party/glm/gtc/round.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/type_aligned.hpp b/third_party/glm/gtc/type_aligned.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/type_precision.hpp b/third_party/glm/gtc/type_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/type_precision.inl b/third_party/glm/gtc/type_precision.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/type_ptr.hpp b/third_party/glm/gtc/type_ptr.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/type_ptr.inl b/third_party/glm/gtc/type_ptr.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/ulp.hpp b/third_party/glm/gtc/ulp.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/ulp.inl b/third_party/glm/gtc/ulp.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtc/vec1.hpp b/third_party/glm/gtc/vec1.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/associated_min_max.hpp b/third_party/glm/gtx/associated_min_max.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/associated_min_max.inl b/third_party/glm/gtx/associated_min_max.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/bit.hpp b/third_party/glm/gtx/bit.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/bit.inl b/third_party/glm/gtx/bit.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/closest_point.hpp b/third_party/glm/gtx/closest_point.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/closest_point.inl b/third_party/glm/gtx/closest_point.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/color_encoding.hpp b/third_party/glm/gtx/color_encoding.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/color_encoding.inl b/third_party/glm/gtx/color_encoding.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/color_space.hpp b/third_party/glm/gtx/color_space.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/color_space.inl b/third_party/glm/gtx/color_space.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/color_space_YCoCg.hpp b/third_party/glm/gtx/color_space_YCoCg.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/color_space_YCoCg.inl b/third_party/glm/gtx/color_space_YCoCg.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/common.hpp b/third_party/glm/gtx/common.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/common.inl b/third_party/glm/gtx/common.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/compatibility.hpp b/third_party/glm/gtx/compatibility.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/compatibility.inl b/third_party/glm/gtx/compatibility.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/component_wise.hpp b/third_party/glm/gtx/component_wise.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/component_wise.inl b/third_party/glm/gtx/component_wise.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/dual_quaternion.hpp b/third_party/glm/gtx/dual_quaternion.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/dual_quaternion.inl b/third_party/glm/gtx/dual_quaternion.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/easing.hpp b/third_party/glm/gtx/easing.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/easing.inl b/third_party/glm/gtx/easing.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/euler_angles.hpp b/third_party/glm/gtx/euler_angles.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/euler_angles.inl b/third_party/glm/gtx/euler_angles.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/extend.hpp b/third_party/glm/gtx/extend.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/extend.inl b/third_party/glm/gtx/extend.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/extended_min_max.hpp b/third_party/glm/gtx/extended_min_max.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/extended_min_max.inl b/third_party/glm/gtx/extended_min_max.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/exterior_product.hpp b/third_party/glm/gtx/exterior_product.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/exterior_product.inl b/third_party/glm/gtx/exterior_product.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/fast_exponential.hpp b/third_party/glm/gtx/fast_exponential.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/fast_exponential.inl b/third_party/glm/gtx/fast_exponential.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/fast_square_root.hpp b/third_party/glm/gtx/fast_square_root.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/fast_square_root.inl b/third_party/glm/gtx/fast_square_root.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/fast_trigonometry.hpp b/third_party/glm/gtx/fast_trigonometry.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/fast_trigonometry.inl b/third_party/glm/gtx/fast_trigonometry.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/float_notmalize.inl b/third_party/glm/gtx/float_notmalize.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/functions.hpp b/third_party/glm/gtx/functions.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/functions.inl b/third_party/glm/gtx/functions.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/gradient_paint.hpp b/third_party/glm/gtx/gradient_paint.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/gradient_paint.inl b/third_party/glm/gtx/gradient_paint.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/handed_coordinate_space.hpp b/third_party/glm/gtx/handed_coordinate_space.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/handed_coordinate_space.inl b/third_party/glm/gtx/handed_coordinate_space.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/hash.hpp b/third_party/glm/gtx/hash.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/hash.inl b/third_party/glm/gtx/hash.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/integer.hpp b/third_party/glm/gtx/integer.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/integer.inl b/third_party/glm/gtx/integer.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/intersect.hpp b/third_party/glm/gtx/intersect.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/intersect.inl b/third_party/glm/gtx/intersect.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/io.hpp b/third_party/glm/gtx/io.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/io.inl b/third_party/glm/gtx/io.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/log_base.hpp b/third_party/glm/gtx/log_base.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/log_base.inl b/third_party/glm/gtx/log_base.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/matrix_cross_product.hpp b/third_party/glm/gtx/matrix_cross_product.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/matrix_cross_product.inl b/third_party/glm/gtx/matrix_cross_product.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/matrix_decompose.hpp b/third_party/glm/gtx/matrix_decompose.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/matrix_decompose.inl b/third_party/glm/gtx/matrix_decompose.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/matrix_factorisation.hpp b/third_party/glm/gtx/matrix_factorisation.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/matrix_factorisation.inl b/third_party/glm/gtx/matrix_factorisation.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/matrix_interpolation.hpp b/third_party/glm/gtx/matrix_interpolation.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/matrix_interpolation.inl b/third_party/glm/gtx/matrix_interpolation.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/matrix_major_storage.hpp b/third_party/glm/gtx/matrix_major_storage.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/matrix_major_storage.inl b/third_party/glm/gtx/matrix_major_storage.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/matrix_operation.hpp b/third_party/glm/gtx/matrix_operation.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/matrix_operation.inl b/third_party/glm/gtx/matrix_operation.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/matrix_query.hpp b/third_party/glm/gtx/matrix_query.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/matrix_query.inl b/third_party/glm/gtx/matrix_query.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/matrix_transform_2d.hpp b/third_party/glm/gtx/matrix_transform_2d.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/matrix_transform_2d.inl b/third_party/glm/gtx/matrix_transform_2d.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/mixed_product.hpp b/third_party/glm/gtx/mixed_product.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/mixed_product.inl b/third_party/glm/gtx/mixed_product.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/norm.hpp b/third_party/glm/gtx/norm.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/norm.inl b/third_party/glm/gtx/norm.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/normal.hpp b/third_party/glm/gtx/normal.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/normal.inl b/third_party/glm/gtx/normal.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/normalize_dot.hpp b/third_party/glm/gtx/normalize_dot.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/normalize_dot.inl b/third_party/glm/gtx/normalize_dot.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/number_precision.hpp b/third_party/glm/gtx/number_precision.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/number_precision.inl b/third_party/glm/gtx/number_precision.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/optimum_pow.hpp b/third_party/glm/gtx/optimum_pow.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/optimum_pow.inl b/third_party/glm/gtx/optimum_pow.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/orthonormalize.hpp b/third_party/glm/gtx/orthonormalize.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/orthonormalize.inl b/third_party/glm/gtx/orthonormalize.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/perpendicular.hpp b/third_party/glm/gtx/perpendicular.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/perpendicular.inl b/third_party/glm/gtx/perpendicular.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/polar_coordinates.hpp b/third_party/glm/gtx/polar_coordinates.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/polar_coordinates.inl b/third_party/glm/gtx/polar_coordinates.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/projection.hpp b/third_party/glm/gtx/projection.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/projection.inl b/third_party/glm/gtx/projection.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/quaternion.hpp b/third_party/glm/gtx/quaternion.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/quaternion.inl b/third_party/glm/gtx/quaternion.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/range.hpp b/third_party/glm/gtx/range.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/raw_data.hpp b/third_party/glm/gtx/raw_data.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/raw_data.inl b/third_party/glm/gtx/raw_data.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/rotate_normalized_axis.hpp b/third_party/glm/gtx/rotate_normalized_axis.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/rotate_normalized_axis.inl b/third_party/glm/gtx/rotate_normalized_axis.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/rotate_vector.hpp b/third_party/glm/gtx/rotate_vector.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/rotate_vector.inl b/third_party/glm/gtx/rotate_vector.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/scalar_multiplication.hpp b/third_party/glm/gtx/scalar_multiplication.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/scalar_relational.hpp b/third_party/glm/gtx/scalar_relational.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/scalar_relational.inl b/third_party/glm/gtx/scalar_relational.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/spline.hpp b/third_party/glm/gtx/spline.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/spline.inl b/third_party/glm/gtx/spline.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/std_based_type.hpp b/third_party/glm/gtx/std_based_type.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/std_based_type.inl b/third_party/glm/gtx/std_based_type.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/string_cast.hpp b/third_party/glm/gtx/string_cast.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/string_cast.inl b/third_party/glm/gtx/string_cast.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/texture.hpp b/third_party/glm/gtx/texture.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/texture.inl b/third_party/glm/gtx/texture.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/transform.hpp b/third_party/glm/gtx/transform.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/transform.inl b/third_party/glm/gtx/transform.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/transform2.hpp b/third_party/glm/gtx/transform2.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/transform2.inl b/third_party/glm/gtx/transform2.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/type_aligned.hpp b/third_party/glm/gtx/type_aligned.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/type_aligned.inl b/third_party/glm/gtx/type_aligned.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/type_trait.hpp b/third_party/glm/gtx/type_trait.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/type_trait.inl b/third_party/glm/gtx/type_trait.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/vec_swizzle.hpp b/third_party/glm/gtx/vec_swizzle.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/vector_angle.hpp b/third_party/glm/gtx/vector_angle.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/vector_angle.inl b/third_party/glm/gtx/vector_angle.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/vector_query.hpp b/third_party/glm/gtx/vector_query.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/vector_query.inl b/third_party/glm/gtx/vector_query.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/wrap.hpp b/third_party/glm/gtx/wrap.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/gtx/wrap.inl b/third_party/glm/gtx/wrap.inl old mode 100644 new mode 100755 diff --git a/third_party/glm/integer.hpp b/third_party/glm/integer.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/mat2x2.hpp b/third_party/glm/mat2x2.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/mat2x3.hpp b/third_party/glm/mat2x3.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/mat2x4.hpp b/third_party/glm/mat2x4.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/mat3x2.hpp b/third_party/glm/mat3x2.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/mat3x3.hpp b/third_party/glm/mat3x3.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/mat3x4.hpp b/third_party/glm/mat3x4.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/mat4x2.hpp b/third_party/glm/mat4x2.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/mat4x3.hpp b/third_party/glm/mat4x3.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/mat4x4.hpp b/third_party/glm/mat4x4.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/matrix.hpp b/third_party/glm/matrix.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/packing.hpp b/third_party/glm/packing.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/simd/common.h b/third_party/glm/simd/common.h old mode 100644 new mode 100755 diff --git a/third_party/glm/simd/exponential.h b/third_party/glm/simd/exponential.h old mode 100644 new mode 100755 diff --git a/third_party/glm/simd/geometric.h b/third_party/glm/simd/geometric.h old mode 100644 new mode 100755 diff --git a/third_party/glm/simd/integer.h b/third_party/glm/simd/integer.h old mode 100644 new mode 100755 diff --git a/third_party/glm/simd/matrix.h b/third_party/glm/simd/matrix.h old mode 100644 new mode 100755 diff --git a/third_party/glm/simd/neon.h b/third_party/glm/simd/neon.h old mode 100644 new mode 100755 diff --git a/third_party/glm/simd/packing.h b/third_party/glm/simd/packing.h old mode 100644 new mode 100755 diff --git a/third_party/glm/simd/platform.h b/third_party/glm/simd/platform.h old mode 100644 new mode 100755 diff --git a/third_party/glm/simd/trigonometric.h b/third_party/glm/simd/trigonometric.h old mode 100644 new mode 100755 diff --git a/third_party/glm/simd/vector_relational.h b/third_party/glm/simd/vector_relational.h old mode 100644 new mode 100755 diff --git a/third_party/glm/trigonometric.hpp b/third_party/glm/trigonometric.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/vec2.hpp b/third_party/glm/vec2.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/vec3.hpp b/third_party/glm/vec3.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/vec4.hpp b/third_party/glm/vec4.hpp old mode 100644 new mode 100755 diff --git a/third_party/glm/vector_relational.hpp b/third_party/glm/vector_relational.hpp old mode 100644 new mode 100755 diff --git a/third_party/stb_image.h b/third_party/stb_image.h old mode 100644 new mode 100755 diff --git a/third_party/stb_rect_pack.h b/third_party/stb_rect_pack.h old mode 100644 new mode 100755 diff --git a/third_party/stb_truetype.h b/third_party/stb_truetype.h old mode 100644 new mode 100755 diff --git a/third_party/vk_video/vulkan_video_codec_h264std.h b/third_party/vk_video/vulkan_video_codec_h264std.h old mode 100644 new mode 100755 diff --git a/third_party/vk_video/vulkan_video_codec_h264std_decode.h b/third_party/vk_video/vulkan_video_codec_h264std_decode.h old mode 100644 new mode 100755 diff --git a/third_party/vk_video/vulkan_video_codec_h264std_encode.h b/third_party/vk_video/vulkan_video_codec_h264std_encode.h old mode 100644 new mode 100755 diff --git a/third_party/vk_video/vulkan_video_codec_h265std.h b/third_party/vk_video/vulkan_video_codec_h265std.h old mode 100644 new mode 100755 diff --git a/third_party/vk_video/vulkan_video_codec_h265std_decode.h b/third_party/vk_video/vulkan_video_codec_h265std_decode.h old mode 100644 new mode 100755 diff --git a/third_party/vk_video/vulkan_video_codec_h265std_encode.h b/third_party/vk_video/vulkan_video_codec_h265std_encode.h old mode 100644 new mode 100755 diff --git a/third_party/vk_video/vulkan_video_codecs_common.h b/third_party/vk_video/vulkan_video_codecs_common.h old mode 100644 new mode 100755 diff --git a/third_party/vma.h b/third_party/vma.h old mode 100644 new mode 100755 diff --git a/third_party/volk.c b/third_party/volk.c old mode 100644 new mode 100755 diff --git a/third_party/volk.h b/third_party/volk.h old mode 100644 new mode 100755 diff --git a/third_party/vulkan/vk_icd.h b/third_party/vulkan/vk_icd.h old mode 100644 new mode 100755 diff --git a/third_party/vulkan/vk_layer.h b/third_party/vulkan/vk_layer.h old mode 100644 new mode 100755 diff --git a/third_party/vulkan/vk_platform.h b/third_party/vulkan/vk_platform.h old mode 100644 new mode 100755 diff --git a/third_party/vulkan/vulkan.cppm b/third_party/vulkan/vulkan.cppm old mode 100644 new mode 100755 diff --git a/third_party/vulkan/vulkan.h b/third_party/vulkan/vulkan.h old mode 100644 new mode 100755 diff --git a/third_party/vulkan/vulkan.hpp b/third_party/vulkan/vulkan.hpp old mode 100644 new mode 100755 diff --git a/third_party/vulkan/vulkan_android.h b/third_party/vulkan/vulkan_android.h old mode 100644 new mode 100755 diff --git a/third_party/vulkan/vulkan_beta.h b/third_party/vulkan/vulkan_beta.h old mode 100644 new mode 100755 diff --git a/third_party/vulkan/vulkan_core.h b/third_party/vulkan/vulkan_core.h old mode 100644 new mode 100755 diff --git a/third_party/vulkan/vulkan_directfb.h b/third_party/vulkan/vulkan_directfb.h old mode 100644 new mode 100755 diff --git a/third_party/vulkan/vulkan_enums.hpp b/third_party/vulkan/vulkan_enums.hpp old mode 100644 new mode 100755 diff --git a/third_party/vulkan/vulkan_extension_inspection.hpp b/third_party/vulkan/vulkan_extension_inspection.hpp old mode 100644 new mode 100755 diff --git a/third_party/vulkan/vulkan_format_traits.hpp b/third_party/vulkan/vulkan_format_traits.hpp old mode 100644 new mode 100755 diff --git a/third_party/vulkan/vulkan_fuchsia.h b/third_party/vulkan/vulkan_fuchsia.h old mode 100644 new mode 100755 diff --git a/third_party/vulkan/vulkan_funcs.hpp b/third_party/vulkan/vulkan_funcs.hpp old mode 100644 new mode 100755 diff --git a/third_party/vulkan/vulkan_ggp.h b/third_party/vulkan/vulkan_ggp.h old mode 100644 new mode 100755 diff --git a/third_party/vulkan/vulkan_handles.hpp b/third_party/vulkan/vulkan_handles.hpp old mode 100644 new mode 100755 diff --git a/third_party/vulkan/vulkan_hash.hpp b/third_party/vulkan/vulkan_hash.hpp old mode 100644 new mode 100755 diff --git a/third_party/vulkan/vulkan_hpp_macros.hpp b/third_party/vulkan/vulkan_hpp_macros.hpp old mode 100644 new mode 100755 diff --git a/third_party/vulkan/vulkan_ios.h b/third_party/vulkan/vulkan_ios.h old mode 100644 new mode 100755 diff --git a/third_party/vulkan/vulkan_macos.h b/third_party/vulkan/vulkan_macos.h old mode 100644 new mode 100755 diff --git a/third_party/vulkan/vulkan_metal.h b/third_party/vulkan/vulkan_metal.h old mode 100644 new mode 100755 diff --git a/third_party/vulkan/vulkan_raii.hpp b/third_party/vulkan/vulkan_raii.hpp old mode 100644 new mode 100755 diff --git a/third_party/vulkan/vulkan_screen.h b/third_party/vulkan/vulkan_screen.h old mode 100644 new mode 100755 diff --git a/third_party/vulkan/vulkan_shared.hpp b/third_party/vulkan/vulkan_shared.hpp old mode 100644 new mode 100755 diff --git a/third_party/vulkan/vulkan_static_assertions.hpp b/third_party/vulkan/vulkan_static_assertions.hpp old mode 100644 new mode 100755 diff --git a/third_party/vulkan/vulkan_structs.hpp b/third_party/vulkan/vulkan_structs.hpp old mode 100644 new mode 100755 diff --git a/third_party/vulkan/vulkan_to_string.hpp b/third_party/vulkan/vulkan_to_string.hpp old mode 100644 new mode 100755 diff --git a/third_party/vulkan/vulkan_vi.h b/third_party/vulkan/vulkan_vi.h old mode 100644 new mode 100755 diff --git a/third_party/vulkan/vulkan_video.hpp b/third_party/vulkan/vulkan_video.hpp old mode 100644 new mode 100755 diff --git a/third_party/vulkan/vulkan_wayland.h b/third_party/vulkan/vulkan_wayland.h old mode 100644 new mode 100755 diff --git a/third_party/vulkan/vulkan_win32.h b/third_party/vulkan/vulkan_win32.h old mode 100644 new mode 100755 diff --git a/third_party/vulkan/vulkan_xcb.h b/third_party/vulkan/vulkan_xcb.h old mode 100644 new mode 100755 diff --git a/third_party/vulkan/vulkan_xlib.h b/third_party/vulkan/vulkan_xlib.h old mode 100644 new mode 100755 diff --git a/third_party/vulkan/vulkan_xlib_xrandr.h b/third_party/vulkan/vulkan_xlib_xrandr.h old mode 100644 new mode 100755 diff --git a/valgrind.supp b/valgrind.supp old mode 100644 new mode 100755 index c0feb86..04fc934 --- a/valgrind.supp +++ b/valgrind.supp @@ -99,31 +99,3 @@ fun:dl_* ... } -{ - name - Memcheck:Leak - fun:calloc - obj:* -} -{ - name - Memcheck:Leak - fun:realloc - obj:* -} -{ - name - Memcheck:Leak - fun:malloc - obj:* - obj:* - obj:* - obj:* - obj:* - obj:* - obj:* - obj:* - obj:* - obj:* - obj:* -} diff --git a/xmake.lua b/xmake.lua old mode 100644 new mode 100755 From de1e8ed5630bae4469083e23ea5008a97b305adb Mon Sep 17 00:00:00 2001 From: Kbz-8 Date: Wed, 17 Jan 2024 05:30:38 +0100 Subject: [PATCH 6/8] i dont know chat i did i was high as f*ck --- example/main.c | 4 ++-- src/core/bridge.cpp | 6 ++--- src/platform/inputs.cpp | 3 +-- src/platform/inputs.h | 7 +++--- src/platform/window.cpp | 3 +-- src/renderer/pipeline/pipeline.cpp | 6 ++--- src/renderer/renderer.cpp | 28 ++++++++++++---------- src/renderer/renderer.h | 5 +++- src/renderer/renderpass/vk_render_pass.cpp | 4 ++-- src/renderer/texts/font.cpp | 6 ++--- src/renderer/texts/font.h | 21 +++------------- src/renderer/texts/text_library.cpp | 3 +-- src/renderer/texts/text_library.h | 3 +-- src/renderer/texts/text_manager.cpp | 22 ++++++++++------- src/renderer/texts/text_manager.h | 5 ++-- 15 files changed, 59 insertions(+), 67 deletions(-) diff --git a/example/main.c b/example/main.c index b579ecf..31191c6 100755 --- a/example/main.c +++ b/example/main.c @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/04 17:55:21 by maldavid #+# #+# */ -/* Updated: 2024/01/16 06:41:48 by maldavid ### ########.fr */ +/* Updated: 2024/01/16 08:03:37 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -152,7 +152,7 @@ int main(void) mlx_loop(mlx.mlx); mlx_get_screens_size(mlx.mlx, &w, &h); - printf("screen size : %dx%d", w, h); + printf("screen size : %dx%d\n", w, h); mlx_destroy_image(mlx.mlx, mlx.logo_png); mlx_destroy_image(mlx.mlx, mlx.logo_jpg); diff --git a/src/core/bridge.cpp b/src/core/bridge.cpp index e847b15..e6d5ca0 100755 --- a/src/core/bridge.cpp +++ b/src/core/bridge.cpp @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/04 17:35:20 by maldavid #+# #+# */ -/* Updated: 2024/01/10 19:54:51 by maldavid ### ########.fr */ +/* Updated: 2024/01/16 08:20:17 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -220,7 +220,7 @@ extern "C" if (filepath == nullptr) { mlx::core::error::report(e_kind::error, "Font loader : filepath is NULL"); - return ; + return; } std::filesystem::path file(filepath); if(std::strcmp(filepath, "default") != 0 && file.extension() != ".ttf" && file.extension() != ".tte") @@ -237,7 +237,7 @@ extern "C" if (filepath == nullptr) { mlx::core::error::report(e_kind::error, "Font loader : filepath is NULL"); - return ; + return; } std::filesystem::path file(filepath); if(std::strcmp(filepath, "default") != 0 && file.extension() != ".ttf" && file.extension() != ".tte") diff --git a/src/platform/inputs.cpp b/src/platform/inputs.cpp index a6de3a7..738fa1b 100755 --- a/src/platform/inputs.cpp +++ b/src/platform/inputs.cpp @@ -6,13 +6,12 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/05 16:30:19 by maldavid #+# #+# */ -/* Updated: 2024/01/11 19:08:23 by maldavid ### ########.fr */ +/* Updated: 2024/01/16 07:59:15 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ #include "inputs.h" #include -#include #include namespace mlx diff --git a/src/platform/inputs.h b/src/platform/inputs.h index fb663fc..e550009 100755 --- a/src/platform/inputs.h +++ b/src/platform/inputs.h @@ -6,15 +6,14 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/05 16:27:35 by maldavid #+# #+# */ -/* Updated: 2023/12/11 19:47:20 by vavaas ### ########.fr */ +/* Updated: 2024/01/16 07:59:08 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ #include #include -#include #include -#include +#include #include #include @@ -26,7 +25,7 @@ namespace mlx { struct Hook { - std::function hook; + func::function hook; void* param = nullptr; }; diff --git a/src/platform/window.cpp b/src/platform/window.cpp index aee77aa..44827ac 100755 --- a/src/platform/window.cpp +++ b/src/platform/window.cpp @@ -6,14 +6,13 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/04 17:36:44 by maldavid #+# #+# */ -/* Updated: 2023/12/27 16:57:28 by maldavid ### ########.fr */ +/* Updated: 2024/01/16 07:59:21 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ #include #include #include -#include namespace mlx { diff --git a/src/renderer/pipeline/pipeline.cpp b/src/renderer/pipeline/pipeline.cpp index b8ca2b6..06ebfd3 100755 --- a/src/renderer/pipeline/pipeline.cpp +++ b/src/renderer/pipeline/pipeline.cpp @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/12/18 21:27:38 by maldavid #+# #+# */ -/* Updated: 2024/01/10 21:53:38 by maldavid ### ########.fr */ +/* Updated: 2024/01/16 07:45:15 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -49,7 +49,7 @@ namespace mlx gl_Position = uProj.mat * vec4(pos.x, pos.y, 0.0, 1.0); } */ - const std::vector vertex_shader = { + const std::vector vertex_shader = { // precompiled vertex shader 0x07230203,0x00010000,0x0008000b,0x0000003b,0x00000000,0x00020011,0x00000001,0x0006000b, 0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001, 0x000a000f,0x00000000,0x00000004,0x6e69616d,0x00000000,0x0000000b,0x0000000f,0x00000015, @@ -124,7 +124,7 @@ namespace mlx fColor = process_color; } */ - const std::vector fragment_shader = { + const std::vector fragment_shader = { // pre compiled fragment shader 0x07230203,0x00010000,0x0008000b,0x0000002c,0x00000000,0x00020011,0x00000001,0x0006000b, 0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001, 0x0007000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x0000000d,0x0000002a,0x00030010, diff --git a/src/renderer/renderer.cpp b/src/renderer/renderer.cpp index 5666e72..2e3b1c1 100755 --- a/src/renderer/renderer.cpp +++ b/src/renderer/renderer.cpp @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/12/18 17:25:16 by maldavid #+# #+# */ -/* Updated: 2024/01/16 07:14:19 by maldavid ### ########.fr */ +/* Updated: 2024/01/16 08:02:57 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -82,12 +82,7 @@ namespace mlx if(result == VK_ERROR_OUT_OF_DATE_KHR) { - _swapchain.recreate(); - _pass.destroy(); - _pass.init(_swapchain.getImagesFormat(), VK_IMAGE_LAYOUT_PRESENT_SRC_KHR); - _framebuffers.clear(); - for(std::size_t i = 0; i < _swapchain.getImagesNumber(); i++) - _framebuffers.emplace_back().init(_pass, _swapchain.getImage(i)); + recreateRenderData(); return false; } else if(result != VK_SUCCESS && result != VK_SUBOPTIMAL_KHR) @@ -150,12 +145,7 @@ namespace mlx if(result == VK_ERROR_OUT_OF_DATE_KHR || result == VK_SUBOPTIMAL_KHR || _framebufferResized) { _framebufferResized = false; - _swapchain.recreate(); - _pass.destroy(); - _pass.init(_swapchain.getImagesFormat(), VK_IMAGE_LAYOUT_PRESENT_SRC_KHR); - _framebuffers.clear(); - for(std::size_t i = 0; i < _swapchain.getImagesNumber(); i++) - _framebuffers.emplace_back().init(_pass, _swapchain.getImage(i)); + recreateRenderData(); } else if(result != VK_SUCCESS) core::error::report(e_kind::fatal_error, "Vulkan error : failed to present swap chain image"); @@ -168,6 +158,18 @@ namespace mlx } } + void Renderer::recreateRenderData() + { + _swapchain.recreate(); + _pass.destroy(); + _pass.init(_swapchain.getImagesFormat(), VK_IMAGE_LAYOUT_PRESENT_SRC_KHR); + for(auto& fb : _framebuffers) + fb.destroy(); + _framebuffers.clear(); + for(std::size_t i = 0; i < _swapchain.getImagesNumber(); i++) + _framebuffers.emplace_back().init(_pass, _swapchain.getImage(i)); + } + void Renderer::destroy() { MLX_PROFILE_FUNCTION(); diff --git a/src/renderer/renderer.h b/src/renderer/renderer.h index 7b4dd5f..1d4869b 100755 --- a/src/renderer/renderer.h +++ b/src/renderer/renderer.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/12/18 17:14:45 by maldavid #+# #+# */ -/* Updated: 2023/12/22 21:59:15 by kbz_8 ### ########.fr */ +/* Updated: 2024/01/16 08:01:25 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -113,6 +113,9 @@ namespace mlx ~Renderer() = default; + private: + void recreateRenderData(); + private: GraphicPipeline _pipeline; CmdManager _cmd; diff --git a/src/renderer/renderpass/vk_render_pass.cpp b/src/renderer/renderpass/vk_render_pass.cpp index 06b5e75..a4a08a1 100755 --- a/src/renderer/renderpass/vk_render_pass.cpp +++ b/src/renderer/renderpass/vk_render_pass.cpp @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/06 18:21:36 by maldavid #+# #+# */ -/* Updated: 2024/01/10 21:53:03 by maldavid ### ########.fr */ +/* Updated: 2024/01/16 08:22:39 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -18,7 +18,7 @@ namespace mlx { - static const VkClearValue clearColor = {{{ 0.0f, 0.0f, 0.0f, 1.0f }}}; // wtf, this mess to satisfy a warning + static const VkClearValue clearColor = {{{ 0.f, 0.f, 0.f, 1.0f }}}; // wtf, this mess to satisfy a warning void RenderPass::init(VkFormat attachement_format, VkImageLayout layout) { diff --git a/src/renderer/texts/font.cpp b/src/renderer/texts/font.cpp index c508c99..35916a9 100755 --- a/src/renderer/texts/font.cpp +++ b/src/renderer/texts/font.cpp @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/12/11 22:06:09 by kbz_8 #+# #+# */ -/* Updated: 2024/01/11 01:23:20 by maldavid ### ########.fr */ +/* Updated: 2024/01/16 09:11:26 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -19,7 +19,7 @@ constexpr const int RANGE = 1024; namespace mlx { - Font::Font(Renderer& renderer, const std::filesystem::path& path, float scale) : non_copyable(), _name(path.string()), _scale(scale) + Font::Font(Renderer& renderer, const std::filesystem::path& path, float scale) : _name(path.string()), _scale(scale) { MLX_PROFILE_FUNCTION(); std::vector tmp_bitmap(RANGE * RANGE); @@ -56,7 +56,7 @@ namespace mlx _atlas.setDescriptor(renderer.getFragDescriptorSet().duplicate()); } - Font::Font(class Renderer& renderer, const std::string& name, const std::vector& ttf_data, float scale) : non_copyable(), _name(name), _scale(scale) + Font::Font(class Renderer& renderer, const std::string& name, const std::vector& ttf_data, float scale) : _name(name), _scale(scale) { MLX_PROFILE_FUNCTION(); std::vector tmp_bitmap(RANGE * RANGE); diff --git a/src/renderer/texts/font.h b/src/renderer/texts/font.h index 1b0ed40..02780fa 100755 --- a/src/renderer/texts/font.h +++ b/src/renderer/texts/font.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/12/11 21:17:04 by kbz_8 #+# #+# */ -/* Updated: 2024/01/11 20:08:55 by maldavid ### ########.fr */ +/* Updated: 2024/01/16 09:14:53 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -15,13 +15,12 @@ #include #include -#include #include #include namespace mlx { - class Font : public non_copyable + class Font { public: Font() = delete; @@ -32,7 +31,7 @@ namespace mlx inline const std::array& getCharData() const { return _cdata; } inline const TextureAtlas& getAtlas() const noexcept { return _atlas; } inline bool operator==(const Font& rhs) const { return rhs._name == _name && rhs._scale == _scale; } - inline bool operator!=(const Font& rhs) const { return rhs._name != _name && rhs._scale != _scale; } + inline bool operator!=(const Font& rhs) const { return rhs._name != _name || rhs._scale != _scale; } ~Font(); private: @@ -43,18 +42,4 @@ namespace mlx }; } -namespace std -{ - template <> - struct hash - { - std::size_t operator()(const mlx::Font& f) const noexcept - { - std::size_t hash = 0; - mlx::hashCombine(hash, f.getName(), f.getScale()); - return hash; - } - }; -} - #endif diff --git a/src/renderer/texts/text_library.cpp b/src/renderer/texts/text_library.cpp index 9dd5658..ab90159 100755 --- a/src/renderer/texts/text_library.cpp +++ b/src/renderer/texts/text_library.cpp @@ -6,11 +6,10 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/04/10 11:59:57 by maldavid #+# #+# */ -/* Updated: 2024/01/11 05:19:24 by maldavid ### ########.fr */ +/* Updated: 2024/01/16 08:54:22 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ -#include #include #include #include diff --git a/src/renderer/texts/text_library.h b/src/renderer/texts/text_library.h index 19ae1eb..9bdef36 100755 --- a/src/renderer/texts/text_library.h +++ b/src/renderer/texts/text_library.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/04/10 11:52:30 by maldavid #+# #+# */ -/* Updated: 2024/01/11 05:08:04 by maldavid ### ########.fr */ +/* Updated: 2024/01/16 08:54:15 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -15,7 +15,6 @@ #include #include -#include #include #include #include diff --git a/src/renderer/texts/text_manager.cpp b/src/renderer/texts/text_manager.cpp index d4a9f82..3ea7400 100755 --- a/src/renderer/texts/text_manager.cpp +++ b/src/renderer/texts/text_manager.cpp @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/04/06 16:41:13 by maldavid #+# #+# */ -/* Updated: 2024/01/11 04:54:16 by maldavid ### ########.fr */ +/* Updated: 2024/01/17 03:47:46 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -14,28 +14,34 @@ #include #include #include -#include #include -#include #include -#include namespace mlx { void TextManager::init(Renderer& renderer) noexcept { MLX_PROFILE_FUNCTION(); - _font_in_use = &const_cast(*_font_set.emplace(renderer, "default", dogica_ttf, 6.0f).first); + loadFont(renderer, "default", 6.f); } void TextManager::loadFont(Renderer& renderer, const std::filesystem::path& filepath, float scale) { MLX_PROFILE_FUNCTION(); - if(filepath.string() == "default") // we're sure it is already loaded - _font_in_use = &const_cast(*_font_set.emplace(renderer, "default", dogica_ttf, scale).first); + for(Font& font : _font_set) + { + if(filepath == font.getName() && scale == font.getScale()) + { + _font_in_use = &font; + return; + } + } + + if(filepath.string() == "default") + _font_in_use = &_font_set.emplace_back(renderer, "default", dogica_ttf, scale); else - _font_in_use = &const_cast(*_font_set.emplace(renderer, filepath, scale).first); + _font_in_use = &_font_set.emplace_back(renderer, filepath, scale); } std::pair TextManager::registerText(int x, int y, uint32_t color, std::string str) diff --git a/src/renderer/texts/text_manager.h b/src/renderer/texts/text_manager.h index d530868..1474232 100755 --- a/src/renderer/texts/text_manager.h +++ b/src/renderer/texts/text_manager.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/04/06 16:24:11 by maldavid #+# #+# */ -/* Updated: 2024/01/11 18:48:01 by maldavid ### ########.fr */ +/* Updated: 2024/01/16 09:04:05 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -40,7 +41,7 @@ namespace mlx private: std::unordered_set _text_descriptors; - std::unordered_set _font_set; + std::vector _font_set; Font* _font_in_use = nullptr; }; } From a0b536483a0de1fa2d9458e973c0423389790c99 Mon Sep 17 00:00:00 2001 From: Kbz-8 Date: Wed, 17 Jan 2024 07:41:15 +0100 Subject: [PATCH 7/8] fixing shit --- .github/dependabot.yml | 0 .github/workflows/fetch_dependencies.yml | 0 .github/workflows/greetings.yml | 0 .github/workflows/linux_clang.yml | 0 .github/workflows/linux_gcc.yml | 0 .github/workflows/macos_x86.yml | 0 .github/workflows/windows.yml | 0 .gitignore | 0 CONTRIBUTING.md | 0 LICENSE | 0 Makefile | 0 README.md | 0 XMAKE_BUILD.md | 0 compile_commands.json | 0 example/42_logo.bmp | Bin example/42_logo.jpg | Bin example/42_logo.png | Bin example/build.sh | 0 example/font.ttf | Bin example/main.c | 0 example/run.sh | 0 includes/mlx.h | 0 includes/mlx_profile.h | 0 res/logo.png | Bin res/screenshot_test.png | Bin res/screenshot_test_windows.png | Bin src/core/UUID.cpp | 0 src/core/UUID.h | 0 src/core/application.cpp | 0 src/core/application.h | 0 src/core/application.inl | 0 src/core/bridge.cpp | 0 src/core/errors.cpp | 0 src/core/errors.h | 0 src/core/graphics.cpp | 0 src/core/graphics.h | 0 src/core/graphics.inl | 0 src/core/memory.cpp | 0 src/core/memory.h | 0 src/core/profiler.cpp | 0 src/core/profiler.h | 0 src/platform/inputs.cpp | 0 src/platform/inputs.h | 0 src/platform/window.cpp | 0 src/platform/window.h | 0 src/renderer/buffers/vk_buffer.cpp | 0 src/renderer/buffers/vk_buffer.h | 0 src/renderer/buffers/vk_ibo.h | 0 src/renderer/buffers/vk_ubo.cpp | 0 src/renderer/buffers/vk_ubo.h | 0 src/renderer/buffers/vk_vbo.cpp | 0 src/renderer/buffers/vk_vbo.h | 0 src/renderer/command/cmd_manager.cpp | 0 src/renderer/command/cmd_manager.h | 0 src/renderer/command/single_time_cmd_manager.cpp | 0 src/renderer/command/single_time_cmd_manager.h | 0 src/renderer/command/vk_cmd_buffer.cpp | 0 src/renderer/command/vk_cmd_buffer.h | 0 src/renderer/command/vk_cmd_pool.cpp | 0 src/renderer/command/vk_cmd_pool.h | 0 src/renderer/core/cmd_resource.h | 0 src/renderer/core/drawable_resource.h | 0 src/renderer/core/memory.cpp | 0 src/renderer/core/memory.h | 0 src/renderer/core/render_core.cpp | 0 src/renderer/core/render_core.h | 0 src/renderer/core/vk_device.cpp | 0 src/renderer/core/vk_device.h | 0 src/renderer/core/vk_fence.cpp | 0 src/renderer/core/vk_fence.h | 0 src/renderer/core/vk_instance.cpp | 0 src/renderer/core/vk_instance.h | 0 src/renderer/core/vk_queues.cpp | 0 src/renderer/core/vk_queues.h | 0 src/renderer/core/vk_semaphore.cpp | 0 src/renderer/core/vk_semaphore.h | 0 src/renderer/core/vk_surface.cpp | 0 src/renderer/core/vk_surface.h | 0 src/renderer/core/vk_validation_layers.cpp | 0 src/renderer/core/vk_validation_layers.h | 0 src/renderer/descriptors/vk_descriptor_pool.cpp | 0 src/renderer/descriptors/vk_descriptor_pool.h | 0 src/renderer/descriptors/vk_descriptor_set.cpp | 0 src/renderer/descriptors/vk_descriptor_set.h | 0 .../descriptors/vk_descriptor_set_layout.cpp | 0 src/renderer/descriptors/vk_descriptor_set_layout.h | 0 src/renderer/images/texture.cpp | 0 src/renderer/images/texture.h | 0 src/renderer/images/texture_atlas.cpp | 0 src/renderer/images/texture_atlas.h | 0 src/renderer/images/texture_descriptor.h | 0 src/renderer/images/texture_manager.h | 0 src/renderer/images/vk_image.cpp | 0 src/renderer/images/vk_image.h | 0 src/renderer/pipeline/pipeline.cpp | 0 src/renderer/pipeline/pipeline.h | 0 src/renderer/pixel_put.cpp | 0 src/renderer/pixel_put.h | 0 src/renderer/renderer.cpp | 0 src/renderer/renderer.h | 0 src/renderer/renderpass/vk_framebuffer.cpp | 0 src/renderer/renderpass/vk_framebuffer.h | 0 src/renderer/renderpass/vk_render_pass.cpp | 0 src/renderer/renderpass/vk_render_pass.h | 0 src/renderer/swapchain/vk_swapchain.cpp | 0 src/renderer/swapchain/vk_swapchain.h | 0 src/renderer/texts/font.cpp | 0 src/renderer/texts/font.h | 0 src/renderer/texts/text.cpp | 0 src/renderer/texts/text.h | 0 src/renderer/texts/text_descriptor.cpp | 0 src/renderer/texts/text_descriptor.h | 0 src/renderer/texts/text_library.cpp | 0 src/renderer/texts/text_library.h | 0 src/renderer/texts/text_manager.cpp | 0 src/renderer/texts/text_manager.h | 0 src/utils/combine_hash.h | 0 src/utils/dogica_ttf.h | 0 src/utils/icon_mlx.h | 0 src/utils/non_copyable.h | 0 src/utils/singleton.h | 0 third_party/function.h | 0 third_party/stb_image.h | 0 third_party/stb_rect_pack.h | 0 third_party/stb_truetype.h | 0 third_party/vk_video/vulkan_video_codec_h264std.h | 0 .../vk_video/vulkan_video_codec_h264std_decode.h | 0 .../vk_video/vulkan_video_codec_h264std_encode.h | 0 third_party/vk_video/vulkan_video_codec_h265std.h | 0 .../vk_video/vulkan_video_codec_h265std_decode.h | 0 .../vk_video/vulkan_video_codec_h265std_encode.h | 0 third_party/vk_video/vulkan_video_codecs_common.h | 0 third_party/vma.h | 0 third_party/volk.c | 0 third_party/volk.h | 0 third_party/vulkan/vk_icd.h | 0 third_party/vulkan/vk_layer.h | 0 third_party/vulkan/vk_platform.h | 0 third_party/vulkan/vulkan.cppm | 0 third_party/vulkan/vulkan.h | 0 third_party/vulkan/vulkan.hpp | 0 third_party/vulkan/vulkan_android.h | 0 third_party/vulkan/vulkan_beta.h | 0 third_party/vulkan/vulkan_core.h | 0 third_party/vulkan/vulkan_directfb.h | 0 third_party/vulkan/vulkan_enums.hpp | 0 third_party/vulkan/vulkan_extension_inspection.hpp | 0 third_party/vulkan/vulkan_format_traits.hpp | 0 third_party/vulkan/vulkan_fuchsia.h | 0 third_party/vulkan/vulkan_funcs.hpp | 0 third_party/vulkan/vulkan_ggp.h | 0 third_party/vulkan/vulkan_handles.hpp | 0 third_party/vulkan/vulkan_hash.hpp | 0 third_party/vulkan/vulkan_hpp_macros.hpp | 0 third_party/vulkan/vulkan_ios.h | 0 third_party/vulkan/vulkan_macos.h | 0 third_party/vulkan/vulkan_metal.h | 0 third_party/vulkan/vulkan_raii.hpp | 0 third_party/vulkan/vulkan_screen.h | 0 third_party/vulkan/vulkan_shared.hpp | 0 third_party/vulkan/vulkan_static_assertions.hpp | 0 third_party/vulkan/vulkan_structs.hpp | 0 third_party/vulkan/vulkan_to_string.hpp | 0 third_party/vulkan/vulkan_vi.h | 0 third_party/vulkan/vulkan_video.hpp | 0 third_party/vulkan/vulkan_wayland.h | 0 third_party/vulkan/vulkan_win32.h | 0 third_party/vulkan/vulkan_xcb.h | 0 third_party/vulkan/vulkan_xlib.h | 0 third_party/vulkan/vulkan_xlib_xrandr.h | 0 valgrind.supp | 0 xmake.lua | 0 172 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 .github/dependabot.yml mode change 100755 => 100644 .github/workflows/fetch_dependencies.yml mode change 100755 => 100644 .github/workflows/greetings.yml mode change 100755 => 100644 .github/workflows/linux_clang.yml mode change 100755 => 100644 .github/workflows/linux_gcc.yml mode change 100755 => 100644 .github/workflows/macos_x86.yml mode change 100755 => 100644 .github/workflows/windows.yml mode change 100755 => 100644 .gitignore mode change 100755 => 100644 CONTRIBUTING.md mode change 100755 => 100644 LICENSE mode change 100755 => 100644 Makefile mode change 100755 => 100644 README.md mode change 100755 => 100644 XMAKE_BUILD.md mode change 100755 => 100644 compile_commands.json mode change 100755 => 100644 example/42_logo.bmp mode change 100755 => 100644 example/42_logo.jpg mode change 100755 => 100644 example/42_logo.png mode change 100755 => 100644 example/build.sh mode change 100755 => 100644 example/font.ttf mode change 100755 => 100644 example/main.c mode change 100755 => 100644 example/run.sh mode change 100755 => 100644 includes/mlx.h mode change 100755 => 100644 includes/mlx_profile.h mode change 100755 => 100644 res/logo.png mode change 100755 => 100644 res/screenshot_test.png mode change 100755 => 100644 res/screenshot_test_windows.png mode change 100755 => 100644 src/core/UUID.cpp mode change 100755 => 100644 src/core/UUID.h mode change 100755 => 100644 src/core/application.cpp mode change 100755 => 100644 src/core/application.h mode change 100755 => 100644 src/core/application.inl mode change 100755 => 100644 src/core/bridge.cpp mode change 100755 => 100644 src/core/errors.cpp mode change 100755 => 100644 src/core/errors.h mode change 100755 => 100644 src/core/graphics.cpp mode change 100755 => 100644 src/core/graphics.h mode change 100755 => 100644 src/core/graphics.inl mode change 100755 => 100644 src/core/memory.cpp mode change 100755 => 100644 src/core/memory.h mode change 100755 => 100644 src/core/profiler.cpp mode change 100755 => 100644 src/core/profiler.h mode change 100755 => 100644 src/platform/inputs.cpp mode change 100755 => 100644 src/platform/inputs.h mode change 100755 => 100644 src/platform/window.cpp mode change 100755 => 100644 src/platform/window.h mode change 100755 => 100644 src/renderer/buffers/vk_buffer.cpp mode change 100755 => 100644 src/renderer/buffers/vk_buffer.h mode change 100755 => 100644 src/renderer/buffers/vk_ibo.h mode change 100755 => 100644 src/renderer/buffers/vk_ubo.cpp mode change 100755 => 100644 src/renderer/buffers/vk_ubo.h mode change 100755 => 100644 src/renderer/buffers/vk_vbo.cpp mode change 100755 => 100644 src/renderer/buffers/vk_vbo.h mode change 100755 => 100644 src/renderer/command/cmd_manager.cpp mode change 100755 => 100644 src/renderer/command/cmd_manager.h mode change 100755 => 100644 src/renderer/command/single_time_cmd_manager.cpp mode change 100755 => 100644 src/renderer/command/single_time_cmd_manager.h mode change 100755 => 100644 src/renderer/command/vk_cmd_buffer.cpp mode change 100755 => 100644 src/renderer/command/vk_cmd_buffer.h mode change 100755 => 100644 src/renderer/command/vk_cmd_pool.cpp mode change 100755 => 100644 src/renderer/command/vk_cmd_pool.h mode change 100755 => 100644 src/renderer/core/cmd_resource.h mode change 100755 => 100644 src/renderer/core/drawable_resource.h mode change 100755 => 100644 src/renderer/core/memory.cpp mode change 100755 => 100644 src/renderer/core/memory.h mode change 100755 => 100644 src/renderer/core/render_core.cpp mode change 100755 => 100644 src/renderer/core/render_core.h mode change 100755 => 100644 src/renderer/core/vk_device.cpp mode change 100755 => 100644 src/renderer/core/vk_device.h mode change 100755 => 100644 src/renderer/core/vk_fence.cpp mode change 100755 => 100644 src/renderer/core/vk_fence.h mode change 100755 => 100644 src/renderer/core/vk_instance.cpp mode change 100755 => 100644 src/renderer/core/vk_instance.h mode change 100755 => 100644 src/renderer/core/vk_queues.cpp mode change 100755 => 100644 src/renderer/core/vk_queues.h mode change 100755 => 100644 src/renderer/core/vk_semaphore.cpp mode change 100755 => 100644 src/renderer/core/vk_semaphore.h mode change 100755 => 100644 src/renderer/core/vk_surface.cpp mode change 100755 => 100644 src/renderer/core/vk_surface.h mode change 100755 => 100644 src/renderer/core/vk_validation_layers.cpp mode change 100755 => 100644 src/renderer/core/vk_validation_layers.h mode change 100755 => 100644 src/renderer/descriptors/vk_descriptor_pool.cpp mode change 100755 => 100644 src/renderer/descriptors/vk_descriptor_pool.h mode change 100755 => 100644 src/renderer/descriptors/vk_descriptor_set.cpp mode change 100755 => 100644 src/renderer/descriptors/vk_descriptor_set.h mode change 100755 => 100644 src/renderer/descriptors/vk_descriptor_set_layout.cpp mode change 100755 => 100644 src/renderer/descriptors/vk_descriptor_set_layout.h mode change 100755 => 100644 src/renderer/images/texture.cpp mode change 100755 => 100644 src/renderer/images/texture.h mode change 100755 => 100644 src/renderer/images/texture_atlas.cpp mode change 100755 => 100644 src/renderer/images/texture_atlas.h mode change 100755 => 100644 src/renderer/images/texture_descriptor.h mode change 100755 => 100644 src/renderer/images/texture_manager.h mode change 100755 => 100644 src/renderer/images/vk_image.cpp mode change 100755 => 100644 src/renderer/images/vk_image.h mode change 100755 => 100644 src/renderer/pipeline/pipeline.cpp mode change 100755 => 100644 src/renderer/pipeline/pipeline.h mode change 100755 => 100644 src/renderer/pixel_put.cpp mode change 100755 => 100644 src/renderer/pixel_put.h mode change 100755 => 100644 src/renderer/renderer.cpp mode change 100755 => 100644 src/renderer/renderer.h mode change 100755 => 100644 src/renderer/renderpass/vk_framebuffer.cpp mode change 100755 => 100644 src/renderer/renderpass/vk_framebuffer.h mode change 100755 => 100644 src/renderer/renderpass/vk_render_pass.cpp mode change 100755 => 100644 src/renderer/renderpass/vk_render_pass.h mode change 100755 => 100644 src/renderer/swapchain/vk_swapchain.cpp mode change 100755 => 100644 src/renderer/swapchain/vk_swapchain.h mode change 100755 => 100644 src/renderer/texts/font.cpp mode change 100755 => 100644 src/renderer/texts/font.h mode change 100755 => 100644 src/renderer/texts/text.cpp mode change 100755 => 100644 src/renderer/texts/text.h mode change 100755 => 100644 src/renderer/texts/text_descriptor.cpp mode change 100755 => 100644 src/renderer/texts/text_descriptor.h mode change 100755 => 100644 src/renderer/texts/text_library.cpp mode change 100755 => 100644 src/renderer/texts/text_library.h mode change 100755 => 100644 src/renderer/texts/text_manager.cpp mode change 100755 => 100644 src/renderer/texts/text_manager.h mode change 100755 => 100644 src/utils/combine_hash.h mode change 100755 => 100644 src/utils/dogica_ttf.h mode change 100755 => 100644 src/utils/icon_mlx.h mode change 100755 => 100644 src/utils/non_copyable.h mode change 100755 => 100644 src/utils/singleton.h mode change 100755 => 100644 third_party/function.h mode change 100755 => 100644 third_party/stb_image.h mode change 100755 => 100644 third_party/stb_rect_pack.h mode change 100755 => 100644 third_party/stb_truetype.h mode change 100755 => 100644 third_party/vk_video/vulkan_video_codec_h264std.h mode change 100755 => 100644 third_party/vk_video/vulkan_video_codec_h264std_decode.h mode change 100755 => 100644 third_party/vk_video/vulkan_video_codec_h264std_encode.h mode change 100755 => 100644 third_party/vk_video/vulkan_video_codec_h265std.h mode change 100755 => 100644 third_party/vk_video/vulkan_video_codec_h265std_decode.h mode change 100755 => 100644 third_party/vk_video/vulkan_video_codec_h265std_encode.h mode change 100755 => 100644 third_party/vk_video/vulkan_video_codecs_common.h mode change 100755 => 100644 third_party/vma.h mode change 100755 => 100644 third_party/volk.c mode change 100755 => 100644 third_party/volk.h mode change 100755 => 100644 third_party/vulkan/vk_icd.h mode change 100755 => 100644 third_party/vulkan/vk_layer.h mode change 100755 => 100644 third_party/vulkan/vk_platform.h mode change 100755 => 100644 third_party/vulkan/vulkan.cppm mode change 100755 => 100644 third_party/vulkan/vulkan.h mode change 100755 => 100644 third_party/vulkan/vulkan.hpp mode change 100755 => 100644 third_party/vulkan/vulkan_android.h mode change 100755 => 100644 third_party/vulkan/vulkan_beta.h mode change 100755 => 100644 third_party/vulkan/vulkan_core.h mode change 100755 => 100644 third_party/vulkan/vulkan_directfb.h mode change 100755 => 100644 third_party/vulkan/vulkan_enums.hpp mode change 100755 => 100644 third_party/vulkan/vulkan_extension_inspection.hpp mode change 100755 => 100644 third_party/vulkan/vulkan_format_traits.hpp mode change 100755 => 100644 third_party/vulkan/vulkan_fuchsia.h mode change 100755 => 100644 third_party/vulkan/vulkan_funcs.hpp mode change 100755 => 100644 third_party/vulkan/vulkan_ggp.h mode change 100755 => 100644 third_party/vulkan/vulkan_handles.hpp mode change 100755 => 100644 third_party/vulkan/vulkan_hash.hpp mode change 100755 => 100644 third_party/vulkan/vulkan_hpp_macros.hpp mode change 100755 => 100644 third_party/vulkan/vulkan_ios.h mode change 100755 => 100644 third_party/vulkan/vulkan_macos.h mode change 100755 => 100644 third_party/vulkan/vulkan_metal.h mode change 100755 => 100644 third_party/vulkan/vulkan_raii.hpp mode change 100755 => 100644 third_party/vulkan/vulkan_screen.h mode change 100755 => 100644 third_party/vulkan/vulkan_shared.hpp mode change 100755 => 100644 third_party/vulkan/vulkan_static_assertions.hpp mode change 100755 => 100644 third_party/vulkan/vulkan_structs.hpp mode change 100755 => 100644 third_party/vulkan/vulkan_to_string.hpp mode change 100755 => 100644 third_party/vulkan/vulkan_vi.h mode change 100755 => 100644 third_party/vulkan/vulkan_video.hpp mode change 100755 => 100644 third_party/vulkan/vulkan_wayland.h mode change 100755 => 100644 third_party/vulkan/vulkan_win32.h mode change 100755 => 100644 third_party/vulkan/vulkan_xcb.h mode change 100755 => 100644 third_party/vulkan/vulkan_xlib.h mode change 100755 => 100644 third_party/vulkan/vulkan_xlib_xrandr.h mode change 100755 => 100644 valgrind.supp mode change 100755 => 100644 xmake.lua diff --git a/.github/dependabot.yml b/.github/dependabot.yml old mode 100755 new mode 100644 diff --git a/.github/workflows/fetch_dependencies.yml b/.github/workflows/fetch_dependencies.yml old mode 100755 new mode 100644 diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml old mode 100755 new mode 100644 diff --git a/.github/workflows/linux_clang.yml b/.github/workflows/linux_clang.yml old mode 100755 new mode 100644 diff --git a/.github/workflows/linux_gcc.yml b/.github/workflows/linux_gcc.yml old mode 100755 new mode 100644 diff --git a/.github/workflows/macos_x86.yml b/.github/workflows/macos_x86.yml old mode 100755 new mode 100644 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml old mode 100755 new mode 100644 diff --git a/.gitignore b/.gitignore old mode 100755 new mode 100644 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md old mode 100755 new mode 100644 diff --git a/LICENSE b/LICENSE old mode 100755 new mode 100644 diff --git a/Makefile b/Makefile old mode 100755 new mode 100644 diff --git a/README.md b/README.md old mode 100755 new mode 100644 diff --git a/XMAKE_BUILD.md b/XMAKE_BUILD.md old mode 100755 new mode 100644 diff --git a/compile_commands.json b/compile_commands.json old mode 100755 new mode 100644 diff --git a/example/42_logo.bmp b/example/42_logo.bmp old mode 100755 new mode 100644 diff --git a/example/42_logo.jpg b/example/42_logo.jpg old mode 100755 new mode 100644 diff --git a/example/42_logo.png b/example/42_logo.png old mode 100755 new mode 100644 diff --git a/example/build.sh b/example/build.sh old mode 100755 new mode 100644 diff --git a/example/font.ttf b/example/font.ttf old mode 100755 new mode 100644 diff --git a/example/main.c b/example/main.c old mode 100755 new mode 100644 diff --git a/example/run.sh b/example/run.sh old mode 100755 new mode 100644 diff --git a/includes/mlx.h b/includes/mlx.h old mode 100755 new mode 100644 diff --git a/includes/mlx_profile.h b/includes/mlx_profile.h old mode 100755 new mode 100644 diff --git a/res/logo.png b/res/logo.png old mode 100755 new mode 100644 diff --git a/res/screenshot_test.png b/res/screenshot_test.png old mode 100755 new mode 100644 diff --git a/res/screenshot_test_windows.png b/res/screenshot_test_windows.png old mode 100755 new mode 100644 diff --git a/src/core/UUID.cpp b/src/core/UUID.cpp old mode 100755 new mode 100644 diff --git a/src/core/UUID.h b/src/core/UUID.h old mode 100755 new mode 100644 diff --git a/src/core/application.cpp b/src/core/application.cpp old mode 100755 new mode 100644 diff --git a/src/core/application.h b/src/core/application.h old mode 100755 new mode 100644 diff --git a/src/core/application.inl b/src/core/application.inl old mode 100755 new mode 100644 diff --git a/src/core/bridge.cpp b/src/core/bridge.cpp old mode 100755 new mode 100644 diff --git a/src/core/errors.cpp b/src/core/errors.cpp old mode 100755 new mode 100644 diff --git a/src/core/errors.h b/src/core/errors.h old mode 100755 new mode 100644 diff --git a/src/core/graphics.cpp b/src/core/graphics.cpp old mode 100755 new mode 100644 diff --git a/src/core/graphics.h b/src/core/graphics.h old mode 100755 new mode 100644 diff --git a/src/core/graphics.inl b/src/core/graphics.inl old mode 100755 new mode 100644 diff --git a/src/core/memory.cpp b/src/core/memory.cpp old mode 100755 new mode 100644 diff --git a/src/core/memory.h b/src/core/memory.h old mode 100755 new mode 100644 diff --git a/src/core/profiler.cpp b/src/core/profiler.cpp old mode 100755 new mode 100644 diff --git a/src/core/profiler.h b/src/core/profiler.h old mode 100755 new mode 100644 diff --git a/src/platform/inputs.cpp b/src/platform/inputs.cpp old mode 100755 new mode 100644 diff --git a/src/platform/inputs.h b/src/platform/inputs.h old mode 100755 new mode 100644 diff --git a/src/platform/window.cpp b/src/platform/window.cpp old mode 100755 new mode 100644 diff --git a/src/platform/window.h b/src/platform/window.h old mode 100755 new mode 100644 diff --git a/src/renderer/buffers/vk_buffer.cpp b/src/renderer/buffers/vk_buffer.cpp old mode 100755 new mode 100644 diff --git a/src/renderer/buffers/vk_buffer.h b/src/renderer/buffers/vk_buffer.h old mode 100755 new mode 100644 diff --git a/src/renderer/buffers/vk_ibo.h b/src/renderer/buffers/vk_ibo.h old mode 100755 new mode 100644 diff --git a/src/renderer/buffers/vk_ubo.cpp b/src/renderer/buffers/vk_ubo.cpp old mode 100755 new mode 100644 diff --git a/src/renderer/buffers/vk_ubo.h b/src/renderer/buffers/vk_ubo.h old mode 100755 new mode 100644 diff --git a/src/renderer/buffers/vk_vbo.cpp b/src/renderer/buffers/vk_vbo.cpp old mode 100755 new mode 100644 diff --git a/src/renderer/buffers/vk_vbo.h b/src/renderer/buffers/vk_vbo.h old mode 100755 new mode 100644 diff --git a/src/renderer/command/cmd_manager.cpp b/src/renderer/command/cmd_manager.cpp old mode 100755 new mode 100644 diff --git a/src/renderer/command/cmd_manager.h b/src/renderer/command/cmd_manager.h old mode 100755 new mode 100644 diff --git a/src/renderer/command/single_time_cmd_manager.cpp b/src/renderer/command/single_time_cmd_manager.cpp old mode 100755 new mode 100644 diff --git a/src/renderer/command/single_time_cmd_manager.h b/src/renderer/command/single_time_cmd_manager.h old mode 100755 new mode 100644 diff --git a/src/renderer/command/vk_cmd_buffer.cpp b/src/renderer/command/vk_cmd_buffer.cpp old mode 100755 new mode 100644 diff --git a/src/renderer/command/vk_cmd_buffer.h b/src/renderer/command/vk_cmd_buffer.h old mode 100755 new mode 100644 diff --git a/src/renderer/command/vk_cmd_pool.cpp b/src/renderer/command/vk_cmd_pool.cpp old mode 100755 new mode 100644 diff --git a/src/renderer/command/vk_cmd_pool.h b/src/renderer/command/vk_cmd_pool.h old mode 100755 new mode 100644 diff --git a/src/renderer/core/cmd_resource.h b/src/renderer/core/cmd_resource.h old mode 100755 new mode 100644 diff --git a/src/renderer/core/drawable_resource.h b/src/renderer/core/drawable_resource.h old mode 100755 new mode 100644 diff --git a/src/renderer/core/memory.cpp b/src/renderer/core/memory.cpp old mode 100755 new mode 100644 diff --git a/src/renderer/core/memory.h b/src/renderer/core/memory.h old mode 100755 new mode 100644 diff --git a/src/renderer/core/render_core.cpp b/src/renderer/core/render_core.cpp old mode 100755 new mode 100644 diff --git a/src/renderer/core/render_core.h b/src/renderer/core/render_core.h old mode 100755 new mode 100644 diff --git a/src/renderer/core/vk_device.cpp b/src/renderer/core/vk_device.cpp old mode 100755 new mode 100644 diff --git a/src/renderer/core/vk_device.h b/src/renderer/core/vk_device.h old mode 100755 new mode 100644 diff --git a/src/renderer/core/vk_fence.cpp b/src/renderer/core/vk_fence.cpp old mode 100755 new mode 100644 diff --git a/src/renderer/core/vk_fence.h b/src/renderer/core/vk_fence.h old mode 100755 new mode 100644 diff --git a/src/renderer/core/vk_instance.cpp b/src/renderer/core/vk_instance.cpp old mode 100755 new mode 100644 diff --git a/src/renderer/core/vk_instance.h b/src/renderer/core/vk_instance.h old mode 100755 new mode 100644 diff --git a/src/renderer/core/vk_queues.cpp b/src/renderer/core/vk_queues.cpp old mode 100755 new mode 100644 diff --git a/src/renderer/core/vk_queues.h b/src/renderer/core/vk_queues.h old mode 100755 new mode 100644 diff --git a/src/renderer/core/vk_semaphore.cpp b/src/renderer/core/vk_semaphore.cpp old mode 100755 new mode 100644 diff --git a/src/renderer/core/vk_semaphore.h b/src/renderer/core/vk_semaphore.h old mode 100755 new mode 100644 diff --git a/src/renderer/core/vk_surface.cpp b/src/renderer/core/vk_surface.cpp old mode 100755 new mode 100644 diff --git a/src/renderer/core/vk_surface.h b/src/renderer/core/vk_surface.h old mode 100755 new mode 100644 diff --git a/src/renderer/core/vk_validation_layers.cpp b/src/renderer/core/vk_validation_layers.cpp old mode 100755 new mode 100644 diff --git a/src/renderer/core/vk_validation_layers.h b/src/renderer/core/vk_validation_layers.h old mode 100755 new mode 100644 diff --git a/src/renderer/descriptors/vk_descriptor_pool.cpp b/src/renderer/descriptors/vk_descriptor_pool.cpp old mode 100755 new mode 100644 diff --git a/src/renderer/descriptors/vk_descriptor_pool.h b/src/renderer/descriptors/vk_descriptor_pool.h old mode 100755 new mode 100644 diff --git a/src/renderer/descriptors/vk_descriptor_set.cpp b/src/renderer/descriptors/vk_descriptor_set.cpp old mode 100755 new mode 100644 diff --git a/src/renderer/descriptors/vk_descriptor_set.h b/src/renderer/descriptors/vk_descriptor_set.h old mode 100755 new mode 100644 diff --git a/src/renderer/descriptors/vk_descriptor_set_layout.cpp b/src/renderer/descriptors/vk_descriptor_set_layout.cpp old mode 100755 new mode 100644 diff --git a/src/renderer/descriptors/vk_descriptor_set_layout.h b/src/renderer/descriptors/vk_descriptor_set_layout.h old mode 100755 new mode 100644 diff --git a/src/renderer/images/texture.cpp b/src/renderer/images/texture.cpp old mode 100755 new mode 100644 diff --git a/src/renderer/images/texture.h b/src/renderer/images/texture.h old mode 100755 new mode 100644 diff --git a/src/renderer/images/texture_atlas.cpp b/src/renderer/images/texture_atlas.cpp old mode 100755 new mode 100644 diff --git a/src/renderer/images/texture_atlas.h b/src/renderer/images/texture_atlas.h old mode 100755 new mode 100644 diff --git a/src/renderer/images/texture_descriptor.h b/src/renderer/images/texture_descriptor.h old mode 100755 new mode 100644 diff --git a/src/renderer/images/texture_manager.h b/src/renderer/images/texture_manager.h old mode 100755 new mode 100644 diff --git a/src/renderer/images/vk_image.cpp b/src/renderer/images/vk_image.cpp old mode 100755 new mode 100644 diff --git a/src/renderer/images/vk_image.h b/src/renderer/images/vk_image.h old mode 100755 new mode 100644 diff --git a/src/renderer/pipeline/pipeline.cpp b/src/renderer/pipeline/pipeline.cpp old mode 100755 new mode 100644 diff --git a/src/renderer/pipeline/pipeline.h b/src/renderer/pipeline/pipeline.h old mode 100755 new mode 100644 diff --git a/src/renderer/pixel_put.cpp b/src/renderer/pixel_put.cpp old mode 100755 new mode 100644 diff --git a/src/renderer/pixel_put.h b/src/renderer/pixel_put.h old mode 100755 new mode 100644 diff --git a/src/renderer/renderer.cpp b/src/renderer/renderer.cpp old mode 100755 new mode 100644 diff --git a/src/renderer/renderer.h b/src/renderer/renderer.h old mode 100755 new mode 100644 diff --git a/src/renderer/renderpass/vk_framebuffer.cpp b/src/renderer/renderpass/vk_framebuffer.cpp old mode 100755 new mode 100644 diff --git a/src/renderer/renderpass/vk_framebuffer.h b/src/renderer/renderpass/vk_framebuffer.h old mode 100755 new mode 100644 diff --git a/src/renderer/renderpass/vk_render_pass.cpp b/src/renderer/renderpass/vk_render_pass.cpp old mode 100755 new mode 100644 diff --git a/src/renderer/renderpass/vk_render_pass.h b/src/renderer/renderpass/vk_render_pass.h old mode 100755 new mode 100644 diff --git a/src/renderer/swapchain/vk_swapchain.cpp b/src/renderer/swapchain/vk_swapchain.cpp old mode 100755 new mode 100644 diff --git a/src/renderer/swapchain/vk_swapchain.h b/src/renderer/swapchain/vk_swapchain.h old mode 100755 new mode 100644 diff --git a/src/renderer/texts/font.cpp b/src/renderer/texts/font.cpp old mode 100755 new mode 100644 diff --git a/src/renderer/texts/font.h b/src/renderer/texts/font.h old mode 100755 new mode 100644 diff --git a/src/renderer/texts/text.cpp b/src/renderer/texts/text.cpp old mode 100755 new mode 100644 diff --git a/src/renderer/texts/text.h b/src/renderer/texts/text.h old mode 100755 new mode 100644 diff --git a/src/renderer/texts/text_descriptor.cpp b/src/renderer/texts/text_descriptor.cpp old mode 100755 new mode 100644 diff --git a/src/renderer/texts/text_descriptor.h b/src/renderer/texts/text_descriptor.h old mode 100755 new mode 100644 diff --git a/src/renderer/texts/text_library.cpp b/src/renderer/texts/text_library.cpp old mode 100755 new mode 100644 diff --git a/src/renderer/texts/text_library.h b/src/renderer/texts/text_library.h old mode 100755 new mode 100644 diff --git a/src/renderer/texts/text_manager.cpp b/src/renderer/texts/text_manager.cpp old mode 100755 new mode 100644 diff --git a/src/renderer/texts/text_manager.h b/src/renderer/texts/text_manager.h old mode 100755 new mode 100644 diff --git a/src/utils/combine_hash.h b/src/utils/combine_hash.h old mode 100755 new mode 100644 diff --git a/src/utils/dogica_ttf.h b/src/utils/dogica_ttf.h old mode 100755 new mode 100644 diff --git a/src/utils/icon_mlx.h b/src/utils/icon_mlx.h old mode 100755 new mode 100644 diff --git a/src/utils/non_copyable.h b/src/utils/non_copyable.h old mode 100755 new mode 100644 diff --git a/src/utils/singleton.h b/src/utils/singleton.h old mode 100755 new mode 100644 diff --git a/third_party/function.h b/third_party/function.h old mode 100755 new mode 100644 diff --git a/third_party/stb_image.h b/third_party/stb_image.h old mode 100755 new mode 100644 diff --git a/third_party/stb_rect_pack.h b/third_party/stb_rect_pack.h old mode 100755 new mode 100644 diff --git a/third_party/stb_truetype.h b/third_party/stb_truetype.h old mode 100755 new mode 100644 diff --git a/third_party/vk_video/vulkan_video_codec_h264std.h b/third_party/vk_video/vulkan_video_codec_h264std.h old mode 100755 new mode 100644 diff --git a/third_party/vk_video/vulkan_video_codec_h264std_decode.h b/third_party/vk_video/vulkan_video_codec_h264std_decode.h old mode 100755 new mode 100644 diff --git a/third_party/vk_video/vulkan_video_codec_h264std_encode.h b/third_party/vk_video/vulkan_video_codec_h264std_encode.h old mode 100755 new mode 100644 diff --git a/third_party/vk_video/vulkan_video_codec_h265std.h b/third_party/vk_video/vulkan_video_codec_h265std.h old mode 100755 new mode 100644 diff --git a/third_party/vk_video/vulkan_video_codec_h265std_decode.h b/third_party/vk_video/vulkan_video_codec_h265std_decode.h old mode 100755 new mode 100644 diff --git a/third_party/vk_video/vulkan_video_codec_h265std_encode.h b/third_party/vk_video/vulkan_video_codec_h265std_encode.h old mode 100755 new mode 100644 diff --git a/third_party/vk_video/vulkan_video_codecs_common.h b/third_party/vk_video/vulkan_video_codecs_common.h old mode 100755 new mode 100644 diff --git a/third_party/vma.h b/third_party/vma.h old mode 100755 new mode 100644 diff --git a/third_party/volk.c b/third_party/volk.c old mode 100755 new mode 100644 diff --git a/third_party/volk.h b/third_party/volk.h old mode 100755 new mode 100644 diff --git a/third_party/vulkan/vk_icd.h b/third_party/vulkan/vk_icd.h old mode 100755 new mode 100644 diff --git a/third_party/vulkan/vk_layer.h b/third_party/vulkan/vk_layer.h old mode 100755 new mode 100644 diff --git a/third_party/vulkan/vk_platform.h b/third_party/vulkan/vk_platform.h old mode 100755 new mode 100644 diff --git a/third_party/vulkan/vulkan.cppm b/third_party/vulkan/vulkan.cppm old mode 100755 new mode 100644 diff --git a/third_party/vulkan/vulkan.h b/third_party/vulkan/vulkan.h old mode 100755 new mode 100644 diff --git a/third_party/vulkan/vulkan.hpp b/third_party/vulkan/vulkan.hpp old mode 100755 new mode 100644 diff --git a/third_party/vulkan/vulkan_android.h b/third_party/vulkan/vulkan_android.h old mode 100755 new mode 100644 diff --git a/third_party/vulkan/vulkan_beta.h b/third_party/vulkan/vulkan_beta.h old mode 100755 new mode 100644 diff --git a/third_party/vulkan/vulkan_core.h b/third_party/vulkan/vulkan_core.h old mode 100755 new mode 100644 diff --git a/third_party/vulkan/vulkan_directfb.h b/third_party/vulkan/vulkan_directfb.h old mode 100755 new mode 100644 diff --git a/third_party/vulkan/vulkan_enums.hpp b/third_party/vulkan/vulkan_enums.hpp old mode 100755 new mode 100644 diff --git a/third_party/vulkan/vulkan_extension_inspection.hpp b/third_party/vulkan/vulkan_extension_inspection.hpp old mode 100755 new mode 100644 diff --git a/third_party/vulkan/vulkan_format_traits.hpp b/third_party/vulkan/vulkan_format_traits.hpp old mode 100755 new mode 100644 diff --git a/third_party/vulkan/vulkan_fuchsia.h b/third_party/vulkan/vulkan_fuchsia.h old mode 100755 new mode 100644 diff --git a/third_party/vulkan/vulkan_funcs.hpp b/third_party/vulkan/vulkan_funcs.hpp old mode 100755 new mode 100644 diff --git a/third_party/vulkan/vulkan_ggp.h b/third_party/vulkan/vulkan_ggp.h old mode 100755 new mode 100644 diff --git a/third_party/vulkan/vulkan_handles.hpp b/third_party/vulkan/vulkan_handles.hpp old mode 100755 new mode 100644 diff --git a/third_party/vulkan/vulkan_hash.hpp b/third_party/vulkan/vulkan_hash.hpp old mode 100755 new mode 100644 diff --git a/third_party/vulkan/vulkan_hpp_macros.hpp b/third_party/vulkan/vulkan_hpp_macros.hpp old mode 100755 new mode 100644 diff --git a/third_party/vulkan/vulkan_ios.h b/third_party/vulkan/vulkan_ios.h old mode 100755 new mode 100644 diff --git a/third_party/vulkan/vulkan_macos.h b/third_party/vulkan/vulkan_macos.h old mode 100755 new mode 100644 diff --git a/third_party/vulkan/vulkan_metal.h b/third_party/vulkan/vulkan_metal.h old mode 100755 new mode 100644 diff --git a/third_party/vulkan/vulkan_raii.hpp b/third_party/vulkan/vulkan_raii.hpp old mode 100755 new mode 100644 diff --git a/third_party/vulkan/vulkan_screen.h b/third_party/vulkan/vulkan_screen.h old mode 100755 new mode 100644 diff --git a/third_party/vulkan/vulkan_shared.hpp b/third_party/vulkan/vulkan_shared.hpp old mode 100755 new mode 100644 diff --git a/third_party/vulkan/vulkan_static_assertions.hpp b/third_party/vulkan/vulkan_static_assertions.hpp old mode 100755 new mode 100644 diff --git a/third_party/vulkan/vulkan_structs.hpp b/third_party/vulkan/vulkan_structs.hpp old mode 100755 new mode 100644 diff --git a/third_party/vulkan/vulkan_to_string.hpp b/third_party/vulkan/vulkan_to_string.hpp old mode 100755 new mode 100644 diff --git a/third_party/vulkan/vulkan_vi.h b/third_party/vulkan/vulkan_vi.h old mode 100755 new mode 100644 diff --git a/third_party/vulkan/vulkan_video.hpp b/third_party/vulkan/vulkan_video.hpp old mode 100755 new mode 100644 diff --git a/third_party/vulkan/vulkan_wayland.h b/third_party/vulkan/vulkan_wayland.h old mode 100755 new mode 100644 diff --git a/third_party/vulkan/vulkan_win32.h b/third_party/vulkan/vulkan_win32.h old mode 100755 new mode 100644 diff --git a/third_party/vulkan/vulkan_xcb.h b/third_party/vulkan/vulkan_xcb.h old mode 100755 new mode 100644 diff --git a/third_party/vulkan/vulkan_xlib.h b/third_party/vulkan/vulkan_xlib.h old mode 100755 new mode 100644 diff --git a/third_party/vulkan/vulkan_xlib_xrandr.h b/third_party/vulkan/vulkan_xlib_xrandr.h old mode 100755 new mode 100644 diff --git a/valgrind.supp b/valgrind.supp old mode 100755 new mode 100644 diff --git a/xmake.lua b/xmake.lua old mode 100755 new mode 100644 From 58e687c952f9ca95c0d0bc050121e2abe1462536 Mon Sep 17 00:00:00 2001 From: Kbz-8 Date: Thu, 18 Jan 2024 13:57:41 +0100 Subject: [PATCH 8/8] fixing allocation issues with texts --- example/build.sh | 0 example/main.c | 18 ++--- example/run.sh | 0 includes/mlx.h | 7 +- src/core/application.cpp | 4 +- src/core/application.h | 4 +- src/core/application.inl | 5 +- src/core/bridge.cpp | 6 +- src/renderer/core/memory.cpp | 6 +- .../descriptors/vk_descriptor_pool.cpp | 3 +- src/renderer/descriptors/vk_descriptor_pool.h | 4 +- .../descriptors/vk_descriptor_set.cpp | 18 ++++- src/renderer/descriptors/vk_descriptor_set.h | 4 +- src/renderer/images/texture.cpp | 3 +- src/renderer/images/texture_atlas.cpp | 3 +- src/renderer/images/texture_atlas.h | 5 +- src/renderer/images/vk_image.cpp | 10 +-- src/renderer/texts/font.cpp | 80 +++++++++---------- src/renderer/texts/font.h | 13 ++- src/renderer/texts/font_library.cpp | 69 ++++++++++++++++ src/renderer/texts/font_library.h | 52 ++++++++++++ src/renderer/texts/text.cpp | 14 +++- src/renderer/texts/text.h | 9 ++- src/renderer/texts/text_descriptor.cpp | 62 +++++++------- src/renderer/texts/text_descriptor.h | 5 +- src/renderer/texts/text_library.cpp | 2 +- src/renderer/texts/text_manager.cpp | 22 ++--- src/renderer/texts/text_manager.h | 9 ++- 28 files changed, 303 insertions(+), 134 deletions(-) mode change 100644 => 100755 example/build.sh mode change 100644 => 100755 example/run.sh create mode 100644 src/renderer/texts/font_library.cpp create mode 100644 src/renderer/texts/font_library.h diff --git a/example/build.sh b/example/build.sh old mode 100644 new mode 100755 diff --git a/example/main.c b/example/main.c index 31191c6..ee817bb 100644 --- a/example/main.c +++ b/example/main.c @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/04 17:55:21 by maldavid #+# #+# */ -/* Updated: 2024/01/16 08:03:37 by maldavid ### ########.fr */ +/* Updated: 2024/01/18 09:58:15 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -135,25 +135,25 @@ int main(void) mlx_on_event(mlx.mlx, mlx.win, MLX_KEYDOWN, key_hook, &mlx); mlx_on_event(mlx.mlx, mlx.win, MLX_WINDOW_EVENT, window_hook, &mlx); - + mlx.logo_png = mlx_png_file_to_image(mlx.mlx, "42_logo.png", &dummy, &dummy); mlx.logo_bmp = mlx_bmp_file_to_image(mlx.mlx, "42_logo.bmp", &dummy, &dummy); mlx.logo_jpg = mlx_jpg_file_to_image(mlx.mlx, "42_logo.jpg", &dummy, &dummy); - + mlx_pixel_put(mlx.mlx, mlx.win, 200, 10, 0xFFFF00FF); mlx_put_image_to_window(mlx.mlx, mlx.win, mlx.logo_png, 10, 190); - + mlx.img = create_image(&mlx); - mlx_string_put(mlx.mlx, mlx.win, 20, 20, 0xFF0020FF, "that text will disappear"); mlx_set_font_scale(mlx.mlx, mlx.win, "font.ttf", 16.f); - + mlx_string_put(mlx.mlx, mlx.win, 20, 20, 0xFF0020FF, "that text will disappear"); + mlx_loop_hook(mlx.mlx, update, &mlx); mlx_loop(mlx.mlx); - - mlx_get_screens_size(mlx.mlx, &w, &h); + + mlx_get_screens_size(mlx.mlx, mlx.win, &w, &h); printf("screen size : %dx%d\n", w, h); - + mlx_destroy_image(mlx.mlx, mlx.logo_png); mlx_destroy_image(mlx.mlx, mlx.logo_jpg); mlx_destroy_image(mlx.mlx, mlx.logo_bmp); diff --git a/example/run.sh b/example/run.sh old mode 100644 new mode 100755 diff --git a/includes/mlx.h b/includes/mlx.h index 6c5c733..809058a 100644 --- a/includes/mlx.h +++ b/includes/mlx.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/04 16:56:35 by maldavid #+# #+# */ -/* Updated: 2024/01/05 19:53:13 by maldavid ### ########.fr */ +/* Updated: 2024/01/18 09:55:36 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -349,15 +349,16 @@ MLX_API int mlx_destroy_display(void* mlx); /** - * @brief Get screen size + * @brief Get the size of the screen the given window is on * * @param mlx Internal MLX application + * @param win Internal window * @param w Get width size * @param h Get height size * * @return (int) Always return 0, made this to copy the behaviour of the original MLX */ -MLX_API int mlx_get_screens_size(void* mlx, int* w, int* h); +MLX_API int mlx_get_screens_size(void* mlx, void* win, int* w, int* h); #ifdef __cplusplus } diff --git a/src/core/application.cpp b/src/core/application.cpp index 514df83..cd33ee8 100644 --- a/src/core/application.cpp +++ b/src/core/application.cpp @@ -6,12 +6,13 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/04 22:10:52 by maldavid #+# #+# */ -/* Updated: 2024/01/11 05:08:42 by maldavid ### ########.fr */ +/* Updated: 2024/01/18 09:44:26 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ #include "application.h" #include +#include #include #include #include @@ -84,6 +85,7 @@ namespace mlx::core Application::~Application() { TextLibrary::get().clearLibrary(); + FontLibrary::get().clearLibrary(); if(__drop_sdl_responsability) return; SDL_QuitSubSystem(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_EVENTS); diff --git a/src/core/application.h b/src/core/application.h index 6b4ee97..fee2c33 100644 --- a/src/core/application.h +++ b/src/core/application.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/04 21:49:46 by maldavid #+# #+# */ -/* Updated: 2024/01/10 19:57:12 by maldavid ### ########.fr */ +/* Updated: 2024/01/18 09:56:04 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -39,7 +39,7 @@ namespace mlx::core inline void onEvent(void* win, int event, int (*funct_ptr)(int, void*), void* param) noexcept; - inline void getScreenSize(int* w, int* h) noexcept; + inline void getScreenSize(void* win, int* w, int* h) noexcept; inline void* newGraphicsSuport(std::size_t w, std::size_t h, const char* title); inline void clearGraphicsSupport(void* win); diff --git a/src/core/application.inl b/src/core/application.inl index d25cb1d..9b27349 100644 --- a/src/core/application.inl +++ b/src/core/application.inl @@ -55,10 +55,11 @@ namespace mlx::core _in->onEvent(_graphics[*static_cast(win)]->getWindow()->getID(), event, funct_ptr, param); } - void Application::getScreenSize(int* w, int* h) noexcept + void Application::getScreenSize(void* win, int* w, int* h) noexcept { + CHECK_WINDOW_PTR(win); SDL_DisplayMode DM; - SDL_GetDesktopDisplayMode(0, &DM); + SDL_GetDesktopDisplayMode(SDL_GetWindowDisplayIndex(_graphics[*static_cast(win)]->getWindow()->getNativeWindow()), &DM); *w = DM.w; *h = DM.h; } diff --git a/src/core/bridge.cpp b/src/core/bridge.cpp index e6d5ca0..5e7b962 100644 --- a/src/core/bridge.cpp +++ b/src/core/bridge.cpp @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/04 17:35:20 by maldavid #+# #+# */ -/* Updated: 2024/01/16 08:20:17 by maldavid ### ########.fr */ +/* Updated: 2024/01/18 09:55:53 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -271,10 +271,10 @@ extern "C" return 0; } - int mlx_get_screens_size(void* mlx, int* w, int* h) + int mlx_get_screens_size(void* mlx, void* win, int* w, int* h) { MLX_CHECK_APPLICATION_POINTER(mlx); - static_cast(mlx)->getScreenSize(w, h); + static_cast(mlx)->getScreenSize(win, w, h); return 0; } } diff --git a/src/renderer/core/memory.cpp b/src/renderer/core/memory.cpp index 1e3ede0..ccb8ed0 100644 --- a/src/renderer/core/memory.cpp +++ b/src/renderer/core/memory.cpp @@ -6,7 +6,7 @@ /* By: kbz_8 +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/10/20 22:02:37 by kbz_8 #+# #+# */ -/* Updated: 2024/01/10 21:54:35 by maldavid ### ########.fr */ +/* Updated: 2024/01/18 10:11:02 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -98,7 +98,7 @@ namespace mlx vmaSetAllocationName(_allocator, allocation, name); } #ifdef DEBUG - core::error::report(e_kind::message, "Graphics Allocator : created new buffer"); + core::error::report(e_kind::message, "Graphics Allocator : created new buffer '%s'", name); #endif _active_buffers_allocations++; return allocation; @@ -128,7 +128,7 @@ namespace mlx vmaSetAllocationName(_allocator, allocation, name); } #ifdef DEBUG - core::error::report(e_kind::message, "Graphics Allocator : created new image"); + core::error::report(e_kind::message, "Graphics Allocator : created new image '%s'", name); #endif _active_images_allocations++; return allocation; diff --git a/src/renderer/descriptors/vk_descriptor_pool.cpp b/src/renderer/descriptors/vk_descriptor_pool.cpp index 188403f..03df39e 100644 --- a/src/renderer/descriptors/vk_descriptor_pool.cpp +++ b/src/renderer/descriptors/vk_descriptor_pool.cpp @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/01/23 18:34:23 by maldavid #+# #+# */ -/* Updated: 2024/01/03 13:13:54 by maldavid ### ########.fr */ +/* Updated: 2024/01/18 10:19:55 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -22,6 +22,7 @@ namespace mlx poolInfo.poolSizeCount = n; poolInfo.pPoolSizes = size; poolInfo.maxSets = 8192; + poolInfo.flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT; VkResult res = vkCreateDescriptorPool(Render_Core::get().getDevice().get(), &poolInfo, nullptr, &_pool); if(res != VK_SUCCESS) diff --git a/src/renderer/descriptors/vk_descriptor_pool.h b/src/renderer/descriptors/vk_descriptor_pool.h index 82cf9c4..2c624ef 100644 --- a/src/renderer/descriptors/vk_descriptor_pool.h +++ b/src/renderer/descriptors/vk_descriptor_pool.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/01/23 18:32:43 by maldavid #+# #+# */ -/* Updated: 2024/01/03 15:27:45 by maldavid ### ########.fr */ +/* Updated: 2024/01/18 10:22:20 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -28,6 +28,8 @@ namespace mlx inline VkDescriptorPool& operator()() noexcept { return _pool; } inline VkDescriptorPool& get() noexcept { return _pool; } + inline bool isInit() const noexcept { return _pool != VK_NULL_HANDLE; } + private: VkDescriptorPool _pool = VK_NULL_HANDLE; }; diff --git a/src/renderer/descriptors/vk_descriptor_set.cpp b/src/renderer/descriptors/vk_descriptor_set.cpp index 423db02..8af5877 100644 --- a/src/renderer/descriptors/vk_descriptor_set.cpp +++ b/src/renderer/descriptors/vk_descriptor_set.cpp @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/01/23 18:40:44 by maldavid #+# #+# */ -/* Updated: 2024/01/10 18:28:34 by maldavid ### ########.fr */ +/* Updated: 2024/01/18 10:22:10 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -106,8 +106,24 @@ namespace mlx { return _desc_set[_renderer->getActiveImageIndex()]; } + VkDescriptorSet& DescriptorSet::get() noexcept { return _desc_set[_renderer->getActiveImageIndex()]; } + + void DescriptorSet::destroy() noexcept + { + MLX_PROFILE_FUNCTION(); + if(_pool->isInit()) + vkFreeDescriptorSets(Render_Core::get().getDevice().get(), _pool->get(), _desc_set.size(), _desc_set.data()); + for(auto& set : _desc_set) + { + if(set != VK_NULL_HANDLE) + set = VK_NULL_HANDLE; + } + #ifdef DEBUG + core::error::report(e_kind::message, "Vulkan : destroyed descriptor set"); + #endif + } } diff --git a/src/renderer/descriptors/vk_descriptor_set.h b/src/renderer/descriptors/vk_descriptor_set.h index d555d5c..5f2191e 100644 --- a/src/renderer/descriptors/vk_descriptor_set.h +++ b/src/renderer/descriptors/vk_descriptor_set.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/01/23 18:39:36 by maldavid #+# #+# */ -/* Updated: 2024/01/03 15:27:50 by maldavid ### ########.fr */ +/* Updated: 2024/01/18 10:13:25 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -35,6 +35,8 @@ namespace mlx VkDescriptorSet& operator()() noexcept; VkDescriptorSet& get() noexcept; + void destroy() noexcept; + private: std::array _desc_set; class DescriptorPool* _pool = nullptr; diff --git a/src/renderer/images/texture.cpp b/src/renderer/images/texture.cpp index 2206f64..16d693f 100644 --- a/src/renderer/images/texture.cpp +++ b/src/renderer/images/texture.cpp @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/03/31 18:03:35 by maldavid #+# #+# */ -/* Updated: 2024/01/11 01:20:29 by maldavid ### ########.fr */ +/* Updated: 2024/01/18 10:18:22 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -155,6 +155,7 @@ namespace mlx { MLX_PROFILE_FUNCTION(); Image::destroy(); + _set.destroy(); if(_buf_map.has_value()) _buf_map->destroy(); _vbo.destroy(); diff --git a/src/renderer/images/texture_atlas.cpp b/src/renderer/images/texture_atlas.cpp index b6eb61b..c03d712 100644 --- a/src/renderer/images/texture_atlas.cpp +++ b/src/renderer/images/texture_atlas.cpp @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/04/07 16:40:09 by maldavid #+# #+# */ -/* Updated: 2023/12/31 00:52:01 by maldavid ### ########.fr */ +/* Updated: 2024/01/18 10:18:08 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -51,5 +51,6 @@ namespace mlx void TextureAtlas::destroy() noexcept { Image::destroy(); + _set.destroy(); } } diff --git a/src/renderer/images/texture_atlas.h b/src/renderer/images/texture_atlas.h index 5fd4da9..bc465d7 100644 --- a/src/renderer/images/texture_atlas.h +++ b/src/renderer/images/texture_atlas.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/04/07 16:36:33 by maldavid #+# #+# */ -/* Updated: 2024/01/08 21:42:31 by maldavid ### ########.fr */ +/* Updated: 2024/01/18 02:47:30 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -30,7 +30,8 @@ namespace mlx void destroy() noexcept override; inline void setDescriptor(DescriptorSet&& set) noexcept { _set = set; } - inline VkDescriptorSet getSet() noexcept { return _set.isInit() ? _set.get() : VK_NULL_HANDLE; } + inline VkDescriptorSet getVkSet() noexcept { return _set.isInit() ? _set.get() : VK_NULL_HANDLE; } + inline DescriptorSet getSet() noexcept { return _set; } inline void updateSet(int binding) noexcept { _set.writeDescriptor(binding, *this); _has_been_updated = true; } inline bool hasBeenUpdated() const noexcept { return _has_been_updated; } inline constexpr void resetUpdate() noexcept { _has_been_updated = false; } diff --git a/src/renderer/images/vk_image.cpp b/src/renderer/images/vk_image.cpp index 3cf0592..412387e 100644 --- a/src/renderer/images/vk_image.cpp +++ b/src/renderer/images/vk_image.cpp @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/01/25 11:59:07 by maldavid #+# #+# */ -/* Updated: 2024/01/07 01:17:54 by maldavid ### ########.fr */ +/* Updated: 2024/01/18 09:47:26 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -252,16 +252,16 @@ namespace mlx void Image::destroy() noexcept { // not creating destroyer in `create` as some image may be copied (and so `this` will be invalid) - CmdResource::setDestroyer([this]() - { + //CmdResource::setDestroyer([this]() + //{ destroySampler(); destroyImageView(); if(_image != VK_NULL_HANDLE) Render_Core::get().getAllocator().destroyImage(_allocation, _image); _image = VK_NULL_HANDLE; - }); - CmdResource::requireDestroy(); + //}); + //CmdResource::requireDestroy(); } uint32_t formatSize(VkFormat format) diff --git a/src/renderer/texts/font.cpp b/src/renderer/texts/font.cpp index 35916a9..d025e12 100644 --- a/src/renderer/texts/font.cpp +++ b/src/renderer/texts/font.cpp @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/12/11 22:06:09 by kbz_8 #+# #+# */ -/* Updated: 2024/01/16 09:11:26 by maldavid ### ########.fr */ +/* Updated: 2024/01/18 13:16:18 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -19,51 +19,43 @@ constexpr const int RANGE = 1024; namespace mlx { - Font::Font(Renderer& renderer, const std::filesystem::path& path, float scale) : _name(path.string()), _scale(scale) + Font::Font(Renderer& renderer, const std::filesystem::path& path, float scale) : _name(path.string()), _renderer(renderer), _scale(scale) { - MLX_PROFILE_FUNCTION(); - std::vector tmp_bitmap(RANGE * RANGE); - std::vector vulkan_bitmap(RANGE * RANGE * 4); - - std::ifstream file(path, std::ios::binary); - if(!file.is_open()) - { - core::error::report(e_kind::error, "Font load : cannot open font file, %s", _name.c_str()); - return; - } - std::ifstream::pos_type fileSize = std::filesystem::file_size(path); - file.seekg(0, std::ios::beg); - std::vector bytes(fileSize); - file.read(reinterpret_cast(bytes.data()), fileSize); - file.close(); - - stbtt_pack_context pc; - stbtt_PackBegin(&pc, tmp_bitmap.data(), RANGE, RANGE, RANGE, 1, nullptr); - stbtt_PackFontRange(&pc, bytes.data(), 0, scale, 32, 96, _cdata.data()); - stbtt_PackEnd(&pc); - for(int i = 0, j = 0; i < RANGE * RANGE; i++, j += 4) - { - vulkan_bitmap[j + 0] = tmp_bitmap[i]; - vulkan_bitmap[j + 1] = tmp_bitmap[i]; - vulkan_bitmap[j + 2] = tmp_bitmap[i]; - vulkan_bitmap[j + 3] = tmp_bitmap[i]; - } - #ifdef DEBUG - _atlas.create(vulkan_bitmap.data(), RANGE, RANGE, VK_FORMAT_R8G8B8A8_UNORM, std::string(_name + "_font_altas").c_str(), true); - #else - _atlas.create(vulkan_bitmap.data(), RANGE, RANGE, VK_FORMAT_R8G8B8A8_UNORM, nullptr, true); - #endif - _atlas.setDescriptor(renderer.getFragDescriptorSet().duplicate()); + _build_data = path; } - Font::Font(class Renderer& renderer, const std::string& name, const std::vector& ttf_data, float scale) : _name(name), _scale(scale) + Font::Font(class Renderer& renderer, const std::string& name, const std::vector& ttf_data, float scale) : _name(name), _renderer(renderer), _scale(scale) + { + _build_data = ttf_data; + } + + void Font::buildFont() { MLX_PROFILE_FUNCTION(); + std::vector file_bytes; + if(std::holds_alternative(_build_data)) + { + std::ifstream file(std::get(_build_data), std::ios::binary); + if(!file.is_open()) + { + core::error::report(e_kind::error, "Font load : cannot open font file, %s", _name.c_str()); + return; + } + std::ifstream::pos_type fileSize = std::filesystem::file_size(std::get(_build_data)); + file.seekg(0, std::ios::beg); + file_bytes.resize(fileSize); + file.read(reinterpret_cast(file_bytes.data()), fileSize); + file.close(); + } + std::vector tmp_bitmap(RANGE * RANGE); std::vector vulkan_bitmap(RANGE * RANGE * 4); stbtt_pack_context pc; stbtt_PackBegin(&pc, tmp_bitmap.data(), RANGE, RANGE, RANGE, 1, nullptr); - stbtt_PackFontRange(&pc, ttf_data.data(), 0, scale, 32, 96, _cdata.data()); + if(std::holds_alternative(_build_data)) + stbtt_PackFontRange(&pc, file_bytes.data(), 0, _scale, 32, 96, _cdata.data()); + else + stbtt_PackFontRange(&pc, std::get>(_build_data).data(), 0, _scale, 32, 96, _cdata.data()); stbtt_PackEnd(&pc); for(int i = 0, j = 0; i < RANGE * RANGE; i++, j += 4) { @@ -77,12 +69,20 @@ namespace mlx #else _atlas.create(vulkan_bitmap.data(), RANGE, RANGE, VK_FORMAT_R8G8B8A8_UNORM, nullptr, true); #endif - _atlas.setDescriptor(renderer.getFragDescriptorSet().duplicate()); + _atlas.setDescriptor(_renderer.getFragDescriptorSet().duplicate()); + _is_init = true; + } + + void Font::destroy() + { + MLX_PROFILE_FUNCTION(); + _atlas.destroy(); + _is_init = false; } Font::~Font() { - MLX_PROFILE_FUNCTION(); - _atlas.destroy(); + if(_is_init) + destroy(); } } diff --git a/src/renderer/texts/font.h b/src/renderer/texts/font.h index 02780fa..9e39cde 100644 --- a/src/renderer/texts/font.h +++ b/src/renderer/texts/font.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/12/11 21:17:04 by kbz_8 #+# #+# */ -/* Updated: 2024/01/16 09:14:53 by maldavid ### ########.fr */ +/* Updated: 2024/01/18 13:15:55 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -17,28 +17,39 @@ #include #include #include +#include namespace mlx { class Font { + friend class FontLibrary; public: Font() = delete; Font(class Renderer& renderer, const std::filesystem::path& path, float scale); Font(class Renderer& renderer, const std::string& name, const std::vector& ttf_data, float scale); + inline const std::string& getName() const { return _name; } inline float getScale() const noexcept { return _scale; } inline const std::array& getCharData() const { return _cdata; } inline const TextureAtlas& getAtlas() const noexcept { return _atlas; } inline bool operator==(const Font& rhs) const { return rhs._name == _name && rhs._scale == _scale; } inline bool operator!=(const Font& rhs) const { return rhs._name != _name || rhs._scale != _scale; } + void destroy(); + ~Font(); + private: + void buildFont(); + private: std::array _cdata; TextureAtlas _atlas; + std::variant> _build_data; std::string _name; + class Renderer& _renderer; float _scale = 0; + bool _is_init = false; }; } diff --git a/src/renderer/texts/font_library.cpp b/src/renderer/texts/font_library.cpp new file mode 100644 index 0000000..e3a04c0 --- /dev/null +++ b/src/renderer/texts/font_library.cpp @@ -0,0 +1,69 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* font_library.cpp :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: maldavid +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2024/01/18 09:28:14 by maldavid #+# #+# */ +/* Updated: 2024/01/18 13:07:48 by maldavid ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include +#include +#include +#include +#include +#include + +namespace mlx +{ + std::shared_ptr FontLibrary::getFontData(FontID id) + { + MLX_PROFILE_FUNCTION(); + if(!_cache.count(id) || std::find(_invalid_ids.begin(), _invalid_ids.end(), id) != _invalid_ids.end()) + core::error::report(e_kind::fatal_error, "Font Library : wrong font ID '%d'", id); + return _cache[id]; + } + + FontID FontLibrary::addFontToLibrary(std::shared_ptr font) + { + MLX_PROFILE_FUNCTION(); + auto it = std::find_if(_cache.begin(), _cache.end(), [&](const std::pair>& v) + { + return v.second->getScale() == font->getScale() && + v.second->getName() == font->getName() && + std::find(_invalid_ids.begin(), _invalid_ids.end(), v.first) == _invalid_ids.end(); + }); + if(it != _cache.end()) + return it->first; + font->buildFont(); + _cache[_current_id] = font; + _current_id++; + return _current_id - 1; + } + + void FontLibrary::removeFontFromLibrary(FontID id) + { + MLX_PROFILE_FUNCTION(); + if(!_cache.count(id) || std::find(_invalid_ids.begin(), _invalid_ids.end(), id) != _invalid_ids.end()) + { + core::error::report(e_kind::warning, "Font Library : trying to remove a font with an unkown or invalid ID '%d'", id); + return; + } + _cache[id]->destroy(); + _invalid_ids.push_back(id); + } + + void FontLibrary::clearLibrary() + { + MLX_PROFILE_FUNCTION(); + for(auto& [id, font] : _cache) + { + font->destroy(); + _invalid_ids.push_back(id); + } + // do not `_cache.clear();` as it releases the fonts and may not destroy the texture atlas that is in use by command buffers + } +} diff --git a/src/renderer/texts/font_library.h b/src/renderer/texts/font_library.h new file mode 100644 index 0000000..9a1d4dc --- /dev/null +++ b/src/renderer/texts/font_library.h @@ -0,0 +1,52 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* font_library.h :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: maldavid +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2024/01/18 09:26:03 by maldavid #+# #+# */ +/* Updated: 2024/01/18 09:33:30 by maldavid ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#ifndef __MLX_FONT_LIBRARY__ +#define __MLX_FONT_LIBRARY__ + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace mlx +{ + using FontID = uint32_t; + constexpr FontID nullfont = 0; + + class FontLibrary : public Singleton + { + friend class Singleton; + + public: + std::shared_ptr getFontData(FontID id); + FontID addFontToLibrary(std::shared_ptr font); + void removeFontFromLibrary(FontID id); + + void clearLibrary(); + + private: + FontLibrary() = default; + ~FontLibrary() = default; + + private: + std::unordered_map> _cache; + std::vector _invalid_ids; + FontID _current_id = 1; + }; +} + +#endif diff --git a/src/renderer/texts/text.cpp b/src/renderer/texts/text.cpp index bf1823d..b26c01c 100644 --- a/src/renderer/texts/text.cpp +++ b/src/renderer/texts/text.cpp @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/01/11 00:11:56 by maldavid #+# #+# */ -/* Updated: 2024/01/11 03:31:57 by maldavid ### ########.fr */ +/* Updated: 2024/01/18 13:56:50 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -16,15 +16,21 @@ namespace mlx { - void Text::init(std::string text, Font const* font, std::vector vbo_data, std::vector ibo_data) + void Text::init(std::string text, FontID font, std::vector vbo_data, std::vector ibo_data) { MLX_PROFILE_FUNCTION(); _text = std::move(text); _font = font; #ifdef DEBUG + std::string debug_name = _text; + for(char& c : debug_name) + { + if(c == ' ' || c == '"' || c == '\'') + c = '_'; + } for(int i = 0; i < MAX_FRAMES_IN_FLIGHT; i++) - _vbo[i].create(sizeof(Vertex) * vbo_data.size(), static_cast(vbo_data.data()), _text.c_str()); - _ibo.create(sizeof(uint16_t) * ibo_data.size(), ibo_data.data(), _text.c_str()); + _vbo[i].create(sizeof(Vertex) * vbo_data.size(), static_cast(vbo_data.data()), debug_name.c_str()); + _ibo.create(sizeof(uint16_t) * ibo_data.size(), ibo_data.data(), debug_name.c_str()); #else for(int i = 0; i < MAX_FRAMES_IN_FLIGHT; i++) _vbo[i].create(sizeof(Vertex) * vbo_data.size(), static_cast(vbo_data.data()), nullptr); diff --git a/src/renderer/texts/text.h b/src/renderer/texts/text.h index eff6f8a..44bd7a1 100644 --- a/src/renderer/texts/text.h +++ b/src/renderer/texts/text.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/01/11 00:09:04 by maldavid #+# #+# */ -/* Updated: 2024/01/11 00:13:25 by maldavid ### ########.fr */ +/* Updated: 2024/01/18 09:37:42 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -26,9 +27,9 @@ namespace mlx public: Text() = default; - void init(std::string text, Font const* font, std::vector vbo_data, std::vector ibo_data); + void init(std::string text, FontID font, std::vector vbo_data, std::vector ibo_data); void bind(class Renderer& renderer) noexcept; - inline const Font& getFontInUse() const noexcept { return *_font; } + inline FontID getFontInUse() const noexcept { return _font; } void updateVertexData(int frame, std::vector vbo_data); inline uint32_t getIBOsize() noexcept { return _ibo.getSize(); } inline const std::string& getText() const { return _text; } @@ -40,7 +41,7 @@ namespace mlx std::array _vbo; C_IBO _ibo; std::string _text; - Font const* _font = nullptr; + FontID _font = nullfont; }; } diff --git a/src/renderer/texts/text_descriptor.cpp b/src/renderer/texts/text_descriptor.cpp index bc1f35a..4db185a 100644 --- a/src/renderer/texts/text_descriptor.cpp +++ b/src/renderer/texts/text_descriptor.cpp @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/01/11 00:23:11 by maldavid #+# #+# */ -/* Updated: 2024/01/11 03:40:54 by maldavid ### ########.fr */ +/* Updated: 2024/01/18 09:44:54 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -33,7 +33,7 @@ namespace mlx TextDrawDescriptor::TextDrawDescriptor(std::string text, uint32_t _color, int _x, int _y) : color(_color), x(_x), y(_y), _text(std::move(text)) {} - void TextDrawDescriptor::init(Font* const font) noexcept + void TextDrawDescriptor::init(FontID font) noexcept { MLX_PROFILE_FUNCTION(); std::vector vertexData; @@ -42,34 +42,38 @@ namespace mlx float stb_x = 0.0f; float stb_y = 0.0f; - for(char c : _text) { - if(c < 32) - continue; + std::shared_ptr font_data = FontLibrary::get().getFontData(font); - stbtt_aligned_quad q; - stbtt_GetPackedQuad(font->getCharData().data(), RANGE, RANGE, c - 32, &stb_x, &stb_y, &q, 1); + for(char c : _text) + { + if(c < 32) + continue; - std::size_t index = vertexData.size(); + stbtt_aligned_quad q; + stbtt_GetPackedQuad(font_data->getCharData().data(), RANGE, RANGE, c - 32, &stb_x, &stb_y, &q, 1); - glm::vec4 vertex_color = { - static_cast((color & 0x000000FF)) / 255.f, - static_cast((color & 0x0000FF00) >> 8) / 255.f, - static_cast((color & 0x00FF0000) >> 16) / 255.f, - static_cast((color & 0xFF000000) >> 24) / 255.f - }; + std::size_t index = vertexData.size(); - vertexData.emplace_back(glm::vec2{q.x0, q.y0}, vertex_color, glm::vec2{q.s0, q.t0}); - vertexData.emplace_back(glm::vec2{q.x1, q.y0}, vertex_color, glm::vec2{q.s1, q.t0}); - vertexData.emplace_back(glm::vec2{q.x1, q.y1}, vertex_color, glm::vec2{q.s1, q.t1}); - vertexData.emplace_back(glm::vec2{q.x0, q.y1}, vertex_color, glm::vec2{q.s0, q.t1}); + glm::vec4 vertex_color = { + static_cast((color & 0x000000FF)) / 255.f, + static_cast((color & 0x0000FF00) >> 8) / 255.f, + static_cast((color & 0x00FF0000) >> 16) / 255.f, + static_cast((color & 0xFF000000) >> 24) / 255.f + }; - indexData.emplace_back(index + 0); - indexData.emplace_back(index + 1); - indexData.emplace_back(index + 2); - indexData.emplace_back(index + 2); - indexData.emplace_back(index + 3); - indexData.emplace_back(index + 0); + vertexData.emplace_back(glm::vec2{q.x0, q.y0}, vertex_color, glm::vec2{q.s0, q.t0}); + vertexData.emplace_back(glm::vec2{q.x1, q.y0}, vertex_color, glm::vec2{q.s1, q.t0}); + vertexData.emplace_back(glm::vec2{q.x1, q.y1}, vertex_color, glm::vec2{q.s1, q.t1}); + vertexData.emplace_back(glm::vec2{q.x0, q.y1}, vertex_color, glm::vec2{q.s0, q.t1}); + + indexData.emplace_back(index + 0); + indexData.emplace_back(index + 1); + indexData.emplace_back(index + 2); + indexData.emplace_back(index + 2); + indexData.emplace_back(index + 3); + indexData.emplace_back(index + 0); + } } std::shared_ptr text_data = std::make_shared(); text_data->init(_text, font, std::move(vertexData), std::move(indexData)); @@ -84,13 +88,14 @@ namespace mlx { MLX_PROFILE_FUNCTION(); std::shared_ptr draw_data = TextLibrary::get().getTextData(id); - TextureAtlas& atlas = const_cast(draw_data->getFontInUse().getAtlas()); + std::shared_ptr font_data = FontLibrary::get().getFontData(draw_data->getFontInUse()); + TextureAtlas& atlas = const_cast(font_data->getAtlas()); draw_data->bind(renderer); - if(atlas.getSet() == VK_NULL_HANDLE) + if(!atlas.getSet().isInit()) atlas.setDescriptor(renderer.getFragDescriptorSet().duplicate()); if(!atlas.hasBeenUpdated()) atlas.updateSet(0); - sets[1] = const_cast(atlas).getSet(); + sets[1] = const_cast(atlas).getVkSet(); vkCmdBindDescriptorSets(renderer.getActiveCmdBuffer().get(), VK_PIPELINE_BIND_POINT_GRAPHICS, renderer.getPipeline().getPipelineLayout(), 0, sets.size(), sets.data(), 0, nullptr); atlas.render(renderer, x, y, draw_data->getIBOsize()); } @@ -98,7 +103,8 @@ namespace mlx void TextDrawDescriptor::resetUpdate() { std::shared_ptr draw_data = TextLibrary::get().getTextData(id); - TextureAtlas& atlas = const_cast(draw_data->getFontInUse().getAtlas()); + std::shared_ptr font_data = FontLibrary::get().getFontData(draw_data->getFontInUse()); + TextureAtlas& atlas = const_cast(font_data->getAtlas()); atlas.resetUpdate(); } } diff --git a/src/renderer/texts/text_descriptor.h b/src/renderer/texts/text_descriptor.h index b44300b..bc8d239 100644 --- a/src/renderer/texts/text_descriptor.h +++ b/src/renderer/texts/text_descriptor.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/01/11 00:13:34 by maldavid #+# #+# */ -/* Updated: 2024/01/11 04:28:58 by maldavid ### ########.fr */ +/* Updated: 2024/01/18 09:40:06 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -19,6 +19,7 @@ #include #include #include +#include #include namespace mlx @@ -36,7 +37,7 @@ namespace mlx public: TextDrawDescriptor(std::string text, uint32_t _color, int _x, int _y); - void init(Font* const font) noexcept; + void init(FontID font) noexcept; bool operator==(const TextDrawDescriptor& rhs) const { return _text == rhs._text && x == rhs.x && y == rhs.y && color == rhs.color; } void render(std::array& sets, Renderer& renderer) override; void resetUpdate() override; diff --git a/src/renderer/texts/text_library.cpp b/src/renderer/texts/text_library.cpp index ab90159..4a61b38 100644 --- a/src/renderer/texts/text_library.cpp +++ b/src/renderer/texts/text_library.cpp @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/04/10 11:59:57 by maldavid #+# #+# */ -/* Updated: 2024/01/16 08:54:22 by maldavid ### ########.fr */ +/* Updated: 2024/01/18 08:02:31 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/src/renderer/texts/text_manager.cpp b/src/renderer/texts/text_manager.cpp index 3ea7400..81dffd7 100644 --- a/src/renderer/texts/text_manager.cpp +++ b/src/renderer/texts/text_manager.cpp @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/04/06 16:41:13 by maldavid #+# #+# */ -/* Updated: 2024/01/17 03:47:46 by maldavid ### ########.fr */ +/* Updated: 2024/01/18 09:45:24 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -29,19 +29,13 @@ namespace mlx void TextManager::loadFont(Renderer& renderer, const std::filesystem::path& filepath, float scale) { MLX_PROFILE_FUNCTION(); - for(Font& font : _font_set) - { - if(filepath == font.getName() && scale == font.getScale()) - { - _font_in_use = &font; - return; - } - } - + std::shared_ptr font; if(filepath.string() == "default") - _font_in_use = &_font_set.emplace_back(renderer, "default", dogica_ttf, scale); + font = std::make_shared(renderer, "default", dogica_ttf, scale); else - _font_in_use = &_font_set.emplace_back(renderer, filepath, scale); + font = std::make_shared(renderer, filepath, scale); + + _font_in_use = FontLibrary::get().addFontToLibrary(font); } std::pair TextManager::registerText(int x, int y, uint32_t color, std::string str) @@ -55,8 +49,9 @@ namespace mlx } auto text_ptr = TextLibrary::get().getTextData(res.first->id); - if(*_font_in_use != text_ptr->getFontInUse()) + if(_font_in_use != text_ptr->getFontInUse()) { + // TODO : update text vertex buffers rather than destroying it and recreating it TextLibrary::get().removeTextFromLibrary(res.first->id); const_cast(*res.first).init(_font_in_use); } @@ -67,6 +62,5 @@ namespace mlx { MLX_PROFILE_FUNCTION(); _text_descriptors.clear(); - _font_set.clear(); } } diff --git a/src/renderer/texts/text_manager.h b/src/renderer/texts/text_manager.h index 1474232..8198b66 100644 --- a/src/renderer/texts/text_manager.h +++ b/src/renderer/texts/text_manager.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/04/06 16:24:11 by maldavid #+# #+# */ -/* Updated: 2024/01/16 09:04:05 by maldavid ### ########.fr */ +/* Updated: 2024/01/18 13:52:01 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -23,6 +23,8 @@ #include #include #include +#include +#include namespace mlx { @@ -33,7 +35,7 @@ namespace mlx void init(Renderer& renderer) noexcept; std::pair registerText(int x, int y, uint32_t color, std::string str); - inline void clear() { _text_descriptors.clear(); /*TextLibrary::get().clearLibrary();*/ } + inline void clear() { _text_descriptors.clear(); TextLibrary::get().clearLibrary(); } void loadFont(Renderer& renderer, const std::filesystem::path& filepath, float scale); void destroy() noexcept; @@ -41,8 +43,7 @@ namespace mlx private: std::unordered_set _text_descriptors; - std::vector _font_set; - Font* _font_in_use = nullptr; + FontID _font_in_use = nullfont; }; }