LWJGL Forum

Programming => OpenGL => Topic started by: jeussa on November 11, 2016, 13:34:28

Title: Moving GLContext
Post by: jeussa on November 11, 2016, 13:34:28
Hi there all,

I was hoping someone here would be able to help me with a small issue I'm currently facing:

what I'm working on currently is a fullscreen option for my window. Whenever the fullscreen is
toggled I recreate the window either setting a monitor (for fullscreen) or no monitor (for a normal
window).
However whenever I toggle this option, all data (the models in this case) are reset. Is there a way
to move the gl context to the new window instead of creating a new one, allowing a seamless
transition between fullscreen and windowed mode?

Thank you for the time ;)
Title: Re: Moving GLContext
Post by: spasi on November 11, 2016, 14:05:57
What LWJGL version are you using? In LWJGL 3.1.0, you can use glfwSetWindowMonitor to toggle between fullscreen and windowed modes without losing the OpenGL context.
Title: Re: Moving GLContext
Post by: jeussa on November 11, 2016, 17:09:33
I am currently using 3.0.0 build 90. I've looked at the 3.1.0 version, however I don't quite get the whole bundle compilation idea. (and I haven't really bothered finding it out either hahah)

Anyway, I'll check it out, thanks!