Offscreen Opengl App

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Offscreen Opengl App

sefjogl
Hello,

I am using http://spout.zeal.co/ to send the content of a texture produced with JOGL and it's working great.

I'm using a FBO with a texture attached.

I do not need anymore to have a window in my Java app that displays the rendering.

Can anyone point me to a documentation or an example that shows how to set-up an opengl context without a screen (NewtFactory.createScreen) and without a window (GLWindow.create) ?

I'm looking for the simplest amount of code I can get away with since I do not need to display the rendering in the Java App.

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Offscreen Opengl App

gouessej
Administrator
Reply | Threaded
Open this post in threaded view
|

Re: Offscreen Opengl App

sefjogl
Hello,

Thanks for your answer.

TestOffscreen01GLPBufferNEWT renders in PBuffer
TestOffscreen02BitmapNEWT renders to a window (glWindow.setVisible(true);)

I need to render in a texture, and without creating a Window since I don't need to display it.

Reply | Threaded
Open this post in threaded view
|

Re: Offscreen Opengl App

gouessej
Administrator
Look for com.jogamp.opengl.FBObject in the projects "jogl" and "jogl-demos". You can look at an example based on JogAmp's Ardor3D Continuation and JOGL in the project "ardor3d-screenshot":
https://github.com/letmaik/ardor3d-screenshot/blob/master/src/main/java/com/github/neothemachine/ardor3d/screenshot/JoglNewtScreenshotCanvas.java It uses JOGL for server-based rendering. It might be a bit difficult to understand how JogAmp's Ardor3D Continuation works to reproduce the same behaviour in pure JOGL without this engine but it seems to do what you're looking for.
Julien Gouesse | Personal blog | Website