/** Creates a framebuffer that will render into the supplied texture. <em>NOTE:</em> this must be * followed immediately by a call to {@link #bindFramebuffer(int,int,int)} or {@link * #pushFramebuffer}. */ public int createFramebuffer(int tex) { flush(true); // flush any pending rendering calls, because createFramebufferImpl (necessarily) // binds the new framebuffer in order to bind it to the specified texture (meh) return createFramebufferImpl(tex); }