From 7931ebc680223c16749eb1e3b2c264149aeb9ed8 Mon Sep 17 00:00:00 2001 From: B-Bischoff Date: Tue, 2 May 2023 18:25:39 +0200 Subject: [PATCH] added application icon --- icon.png | Bin 0 -> 4310 bytes inc/include.hpp | 4 ++-- src/Application.cpp | 13 ++++++++++++- 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 icon.png diff --git a/icon.png b/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..b4f1c7a7513b35efd1d658bdb7550575b1dfa924 GIT binary patch literal 4310 zcmaJ^XEfaH)Bdg1%PK*N4NDNcgoqZ4#o9!T-h0?sy(gB{MF}DjolSJBMJIZ+=tPSs zk)nkVHR`*0{wH7G5BGJSx#q*nnK?7(nx{HiNIL3k)Bpg`q106#5P#g?M@d3N4fBIc z004!f5eOX=0s(XPbbE-#H~;`&5;p0sdY9sr$i;$}ti^mYO7A%lK5t6 zqeZud)~|sj=cOcy^HK*YqQ4l0!*Ua*q6dZS44;p0U$;7>+&&ZOs6O2|hu(eEVXLUf zooy3|zEp8Z+vOAa3U>L5;DEr6%uW&NGI!9orsW;BmFEK_BXMc7gHVq+V966k< zaIQ2hnslGjh%64eJA)&i-4DCy__bi#{nSI0Kb=%r^x3XBZMa{^!+DR^gzJR?B&0bZ zf-ReiPQXM?-t?U5Ddp-sxk&k3`dbR~EdZP z003!6sVM3Df7;9n(AP6!@8wWtdg(-h>KnLc3?{Lug|WuqqKgci^=PI4bR5oHYY}C$ z4_FLd)U;eUOm1#{5)7}$g>O>g(e8=X1W-=R!2wGFL15( z_1ZoaNJ9cN$KSSId*xxyea8MI!cSUMxU?eQx5`-!dOyGFwhz+c_=$Z#A9RL67LP;B zx*V1i2iLcBRe4;(%_XnSw=}cLYBB%mp~KvybIe4<5Gii)1#8qjqk{K6;WS69HS;xQ zVYfdUei$||_-I#7W9=MdJJqRz@=lHF9o$n>d!sv6^wO&MXAGiauY|F#6y(m1tG z%M@PQ^k#3p?99r-D+q9Fl?_JuzLgdlg~$b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1VZyd90-e(>E&LFDb})YM>sKm~>opA8~`WIq-&V0oa&EpDsk*!-}7sYH!p z?4Y&z_oUB#Rgiop$5nPIX3LV#Rli;v1mRM4sRjhi{AuY!fQSPMJ+5RFXGbTG36;2Q zK^;ZL@QcnJ+cpa~;gj8$2D(Xj>0~PH+LIMgL*wsla2~GwMk>#^7eDk&+hlpQ(^;5o zhZoikAez{)l5Nj2AF%Dif1{oY~t3RJ7k8#oz8*)Whha$Ec&0#7XDDpIHMy9 z`Ij%XRP{FgJm=jFogl+23{<}%ZX-M%v~+iHv~jCLH0WFvU)^+Hic~EBe;T<*rU@_z zwrJD3L)`S@nB2?F72SK+G!pjXwN(49$N2aLG7`pR__AV;@qAzhiCIkK_g=~H*nk96@e#*XI1iG*BNuv>2yenNqR_089vz%wgU**CCj z`n+A!kTRpfVF=5-Ta4N84r3Kg(OV`97XY=tbk_G4McHCI80m6GkBHol%f zo1o|&uDb?IjO_OPc~r8E&W3dsEd{u23lCMIPv&__7Uxq23d#tmR0b6UPmi|e<@Ihl zFBfsCE~(Db04Y?f14nSK|L2}7;8NDo(t5@gpTH5H5Pugc9tWX|-=klB^5jJS@UeaO zJ;gkL1Xmgx&35nafyf0g0F;aXB@q5l@dCt6M$lWQ?z1EwyZ}m7OQl@dI`sblPaOrj literal 0 HcmV?d00001 diff --git a/inc/include.hpp b/inc/include.hpp index 91c196c..f741e72 100644 --- a/inc/include.hpp +++ b/inc/include.hpp @@ -5,9 +5,7 @@ #include // GLM -//#include "glm/glm.hpp" #include "../external/glm-0.9.9.8/glm/glm.hpp" -//#include "glm/gtc/matrix_transform.hpp" #include "../external/glm-0.9.9.8/glm/gtc/matrix_transform.hpp" #include "../src/vendor/imgui/imgui.h" @@ -16,6 +14,8 @@ #include "../src/vendor/imgui/imfilebrowser.h" #include "../src/vendor/imgui/imgui_color_gradient.h" +#include "../src/vendor/stb/stb_image.h" + #include "../external/kissfft/kiss_fftr.h" #include "../external/kissfft/kiss_fft.h" diff --git a/src/Application.cpp b/src/Application.cpp index a05c221..01496b3 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -23,7 +23,7 @@ Application::Application(const int& width, const int& height) GLFWmonitor* monitor = glfwGetPrimaryMonitor(); const GLFWvidmode* mode = glfwGetVideoMode(monitor); - + glfwWindowHint(GLFW_RED_BITS, mode->redBits); glfwWindowHint(GLFW_GREEN_BITS, mode->greenBits); glfwWindowHint(GLFW_BLUE_BITS, mode->blueBits); @@ -49,6 +49,17 @@ Application::Application(const int& width, const int& height) exit(1); } + // Application icon + GLFWimage icons[1]; + icons[0].pixels = stbi_load("./icon.png", &icons[0].width, &icons[0].height, 0, 4); + if (icons[0].pixels == NULL) + std::cout << "Failed to load icon" << std::endl; + else + { + glfwSetWindowIcon(_window, 1, icons); + stbi_image_free(icons[0].pixels); + } + loop(); }