Hi,
I'm trying to render a 3d scene offscreen on an image. It works but (only in the case I use a hardware render) it opens a window, just for a few seconds. Is it possible to avoid the display to be shown?
Here is my code:
buffer = new FrameBuffer(800, 600, FrameBuffer.SAMPLINGMODE_GL_AA_4X);
buffer.disableRenderer(IRenderer.RENDERER_SOFTWARE);
buffer.enableRenderer(IRenderer.RENDERER_OPENGL);
buffer.clear(java.awt.Color.LIGHT_GRAY);
world.renderScene(buffer);
world.draw(buffer);
String name = "/test" + Math.random() + ".png";
System.out.println(name);
ImageIO.write((BufferedImage) buffer.getOutputBuffer(), "png", new File(name));
buffer.disableRenderer(IRenderer.RENDERER_OPENGL);
buffer.dispose();
If I use the software render it does not open any window, while if I use the hardware render it opens a window and then just closes it (without showing anything). Is there some kind of configuration I can set to avoid any window to show?
Thanks for any help
Eve
I guess not. The window has the GL context. No window, no context.
ok..thanks :P