LWJGL 3 - How to set an icon for a GLFWwindow?

Started by SilverTiger, December 16, 2014, 17:15:52

Previous topic - Next topic

SilverTiger

In C++ you can make an icon for your GLFWwindow if you make a resource named GLFW_ICON.
How would you make an icon in LWJGL3? Is there some hidden switch like "org.lwjgl.librarypath" or do you have to declare a ByteBuffer with image data like in LWJGL2?
Thanks in advance.

spasi

I don't think that can be made to work with LWJGL.

There is currently a GLFW branch that adds support for setting the window icon at runtime, here. It's a work in progress but LWJGL will support it as soon as it's ready.

SilverTiger

That's good to hear, it would be too bad if you can't use your own icons in your applications.
Thanks :)

HalGlobal

I'm sorry to answer this post who it's old.
But anyone have any news for LWJGL 3 Icon?

quew8

Given that the last commit on the glfw branch was "added api and win32 implementation," (back in June) I'd say it is still a way off.


spasi

If LWJGL 3.0 comes much earlier than GLFW 3.2, I'll implement a temporary solution for setting window icons in LWJGL. Possibly a port of LWJGL 2's code.

theagentd

We're currently trying to implement window icons, but it's not in there yet. Is LWJGL 3 not technically out? >_<

Mickelukas

Quote from: theagentd on September 06, 2015, 03:54:15
We're currently trying to implement window icons, but it's not in there yet. Is LWJGL 3 not technically out? >_<

Nope, 3.0.0 beta build 23.

spasi

Quote from: theagentd on September 06, 2015, 03:54:15We're currently trying to implement window icons, but it's not in there yet.

I just did two PRs to GLFW:

Improvements to the Windows glfwSetWindowIcons implementation
Linux glfwSetWindowIcons implementation

Depending on the response, I may add these to our GLFW build soon.

Quote from: theagentd on September 06, 2015, 03:54:15Is LWJGL 3 not technically out? >_<

LWJGL 3.0 has not been released. We're technically still at alpha, but the beta is getting close now. The only major issue at the moment is the structs API, for which I plan to start a discussion soon. After that's done, the core API will freeze. Then, for the 3.0 release, there will only be binding fixes (OpenAL and OpenCL need some love) and additions (hwloc and maybe xxHash).

spasi

The glfwSetWindowIcon function has now been added to GLFW, available to the latest nightly build (3.0.0 #46).