glfm icon indicating copy to clipboard operation
glfm copied to clipboard

Default frame buffer object

Open eprikazchikov opened this issue 6 years ago • 1 comments

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*.

eprikazchikov avatar Aug 06 '19 06:08 eprikazchikov

I think using glGet* is a better solution here. I have done this in my own code.

GLint param;
glGetIntegerv(GL_FRAMEBUFFER_BINDING, &param);

brackeen avatar Aug 07 '19 12:08 brackeen