1

I need to develop an app using Java wrapper for OpenGL LWJGL.The app will run on remote server in a headless mode.I am trying to understand if and how is it possible taking into consideration the fact that GL context in LWJGL (and in other APis) is created via Java UI elements like Canvas etc.In my case I need to be able to init GL context without creating a window as the drawing targets will be FBOs from which the pixel buffers will render to texture. There is one possible solution though already called PBuffer (I guess pixel buffer) object in LWJGL.It indeed doesn't need GL context created via window as it creates it internally.I don't want to use this method both because it is older concept (and weaker ) than Frame buffer object and because I am using OGL 3.3 -> .So I really don't want to mix with any old pipeline legacy.

I have basically 2 questions:

1.Can I create a context without setting up a window to use for FBO based rendering(headless mode) ?

2.If the answer to the first question is negative ,then can I run on the remote server such an app where the windows is still initialized for the sake of context access ?

UPDATE: The question can be closed.I tested it via first initialization done with PBuffers to set a context.Then FBO rendering works as supposed.

Michael IV
  • 11,016
  • 12
  • 92
  • 223

1 Answers1

1

I found the answer on my own. One should set PBuffer first to create headless GL context. Once it is created we can use FBOs to render frames into images.

Michael IV
  • 11,016
  • 12
  • 92
  • 223
  • I am able to create Headless GL Context using PBuffer. I used FrameBuffer after that. Can you show me running example of it? I am not able to update the buffer. When I create a screenshot of it, I could see a single image all over again. Might be there is some way to update the Buffer. – Bhushan Gadekar Jul 14 '16 at 03:42