Hi,
I’d like to know how i could render offscreen with the same GLEventListener to a Jpeg which is much more bigger that the GLJPanel.
I tried using a GLPBuffer and it seems to be filled now but how can i get the content of a GLPBuffer in a BufferedImage for example ?
if (evt.getKeyCode() == KeyEvent.VK_C) {
GLDrawableFactory factory = GLDrawableFactory.getFactory();
if(factory.canCreateGLPbuffer())
{
GLPbuffer pbuffer = factory.createGLPbuffer(panel.getChosenGLCapabilities(), new DefaultGLCapabilitiesChooser(), 1650, 1050, panel.getContext());
pbuffer.addGLEventListener(this.cube);
pbuffer.display();
//TODO get the content of the pbuffer
pbuffer.destroy();
}
}
I’m not comfortable with the screenshot class which requires to be in the same thread as the one which displays. Isn’t it possible to render than get the result and place it in a file?
Thanks