Ported Framebuffer API to Modern OpenGL. Here’s a small snippet showing how to use the framebuffer.
frameBuffer.use();
{
g.setColor(Color.CRIMSON);
g.drawRectangle(100, 100, 100, 100);
g.setColor(Color.CLOUDS);
g.drawString("This is rendered to framebuffer!!", 0, 0);
}
frameBuffer.release();
That renders to the framebuffer. Then you can simply get the rendered texture by calling [icode]frameBuffer.getTextureObject()[/icode] and use it while rendering. The test renders the texture to a rotating rectangle.
And here is the FrameBufferTest running under Mac with OpenGL 3.3 (A crappy gif I could record)
And also fixed a small bug that caused rendering of [icode]SubTexture[/icode]s to cause an NullPointerException. Anyways, this is so small right now.
We plan to release this somewhere between 20th and 30th of December, and there is a lot more to do. Jev is currently working on a TMX map loader, and it’s going on pretty well, that should be available in his next commit. Till then, I’ll be working on the documentation, and will be testing to find any bugs that might crept in.
Happy Time Folks!!