The Wayback Machine - https://web.archive.org/web/20201122034018/https://github.com/exokitxr/exokit/issues/995
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exokit app icon #995

Open
avaer opened this issue Apr 30, 2019 · 2 comments
Open

Exokit app icon #995

avaer opened this issue Apr 30, 2019 · 2 comments

Comments

@avaer
Copy link
Member

@avaer avaer commented Apr 30, 2019

The application icon can be set with glfwSetWindowIcon.

For that we would need to get a 48x48 non-premultiplied RGBA binary version of the exokit icon.

Capture 20

@chrislatorres
Copy link
Contributor

@chrislatorres chrislatorres commented May 23, 2019

Not sure what this means specifically:

non-premultiplied RGBA binary version

here is a 48x48 png:
48icon


48x48 ico: https://transfer.sh/v80yy/48icon_dCq_icon.ico

Unless there is something I'm missing from the above format, thinking in glfw.cc:

#define STB_IMAGE_IMPLEMENTATION
#include <stb_image.h>

https://github.com/nothings/stb/blob/master/stb_image.h

    GLFWimage images[1];
    images[0].pixels = stbi_load("icon.png", &images[0].width, &images[0].height, 0, 4);
    glfwSetWindowIcon(window, 1, images);
    stbi_image_free(images[0].pixels);
@avaer
Copy link
Member Author

@avaer avaer commented May 23, 2019

It just means we need to decode the image, and cannot just use a PNG.

The code above decodes a PNG.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.