glfm
glfm copied to clipboard
Default frame buffer object
Hi, it would be nice to have the public interface to get the default frame buffer id like uint32_t glfmDefaultFrameBuffer() in most cases it will return 0 but for the iOS/tvOS case it must return _defaultFramebuffer from the implementation. The motivation of this is simple, in case of if you are using framebuffers inside mainLoopFunc it would be hard to restore the default framebuffer without any glGet*.
I think using glGet* is a better solution here. I have done this in my own code.
GLint param;
glGetIntegerv(GL_FRAMEBUFFER_BINDING, ¶m);