SpiecsEngine
 
Loading...
Searching...
No Matches

◆ WindowIcon()

Spices::WindowIcon::WindowIcon ( const std::string & iconPath)
inline

Constructor Function. Load the icon file immediately.

Parameters
[in]iconPathThe file path of icon.

Definition at line 25 of file VulkanWindows.h.

26 {
27 if (image.pixels)
28 {
29 stbi_image_free(image.pixels);
30 }
31
32 int texChannels;
33 image.pixels = stbi_load(iconPath.c_str(), &image.width, &image.height, &texChannels, STBI_rgb_alpha);
34 if (!image.pixels)
35 {
36 SPICES_CORE_ERROR("Failed to load texture image!");
37 }
38 }
GLFWimage image
GLFWimage.