Thanks! i'm almost there, i managed to render and save the texture. But i have a problem: if i remove the window creation altogether, it breaks with the message "There is no OpenGL context current in the current thread.".
I understood that a context must be created, which can be done with the windowId:
glfwMakeContextCurrent(windowID);
GLContext ctx = GLContext.createFromCurrent();
But how can i create a context without the window? I've read around that there's something known as PBuffer, and there was a PBuffer class in old lwjgl, but it's not there anymore. Is that the correct way to do?
Also, i've understood that glfw is a system that manage windows lifecycle. Should i remove it? What should i substitute glfwInit() with?
Thanks a lot!