LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: SilverTiger on December 16, 2014, 17:15:52

Title: LWJGL 3 - How to set an icon for a GLFWwindow?
Post by: SilverTiger on December 16, 2014, 17:15:52
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.
Title: Re: LWJGL3 glfwWindow Icon
Post by: spasi on December 16, 2014, 17:43:13
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 (https://github.com/glfw/glfw/compare/windowicon). It's a work in progress but LWJGL will support it as soon as it's ready.
Title: Re: LWJGL 3 - How to set an icon for a GLFWwindow?
Post by: SilverTiger on December 16, 2014, 18:03:39
That's good to hear, it would be too bad if you can't use your own icons in your applications.
Thanks :)
Title: Re: LWJGL 3 - How to set an icon for a GLFWwindow?
Post by: HalGlobal on August 29, 2015, 17:29:36
I'm sorry to answer this post who it's old.
But anyone have any news for LWJGL 3 Icon?
Title: Re: LWJGL 3 - How to set an icon for a GLFWwindow?
Post by: quew8 on August 29, 2015, 20:14:18
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.
Title: Re: LWJGL 3 - How to set an icon for a GLFWwindow?
Post by: HalGlobal on August 29, 2015, 20:37:41
And for this commit -> https://github.com/glfw/glfw/pull/467
Title: Re: LWJGL 3 - How to set an icon for a GLFWwindow?
Post by: spasi on August 31, 2015, 09:09:18
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.
Title: Re: LWJGL 3 - How to set an icon for a GLFWwindow?
Post by: 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? >_<
Title: Re: LWJGL 3 - How to set an icon for a GLFWwindow?
Post by: Mickelukas on September 06, 2015, 09:48:22
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.
Title: Re: LWJGL 3 - How to set an icon for a GLFWwindow?
Post by: spasi on September 07, 2015, 13:53:41
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 (https://github.com/glfw/glfw/pull/597)
Linux glfwSetWindowIcons implementation (https://github.com/glfw/glfw/pull/598)

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 (http://www.open-mpi.org/projects/hwloc/) and maybe xxHash (https://github.com/Cyan4973/xxHash)).
Title: Re: LWJGL 3 - How to set an icon for a GLFWwindow?
Post by: spasi on March 10, 2016, 22:19:59
The glfwSetWindowIcon function has now been added to GLFW, available to the latest nightly build (3.0.0 #46).