Hi, I'm trying to add antialiasing, using the software rendered, but I think I'm doing something wrong since I'm getting just a black image.
Here is my code:
Quote
buffer = new FrameBuffer(800, 600, FrameBuffer.SAMPLINGMODE_OGSS);
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.dispose();
It works fine with SAMPLINGMODE_NORMAL (but "ugly"), or with hardware renderer and SAMPLINGMODE_GL_AA_4X (perfect actually).
What am I doing wrong?
Thanks for any help
Eve
Edit: I'm not getting any error in console
Your code misses the call to FrameBuffer.update()....
Thanks. Sorry I'm new to this library, and the fact that it was working with hardware renderer was misleading.
Ps Now I have a little problem with texture but I think I'll use a new topic.
The hardware renderer does nothing in update(), but its good practice to add it anyway. If nothing needs to be done, its simply a very cheap nop.