However, in some instances, the framebuffer for the desired output window is not index 0. For example, in Unreal, when running in the editor the framebuffer index of the preview window is 50, not 0.
Suggest adding a new callback to OSVR_OpenGLToolkitFunctions that makes it possible to specify an alternate framebuffer. Either a callback similar to makeCurrent (i.e. makeFramebufferCurrent or similar) or a function that returns the desired framebuffer.
In the OpenGL code, there is an assumption that framebuffer index 0 represents the framebuffer for the current window, even when a custom
OSVR_OpenGLToolkitFunctions
is specified: https://github.com/sensics/OSVR-RenderManager/blob/master/osvr/RenderKit/RenderManagerOpenGL.cpp#L1112However, in some instances, the framebuffer for the desired output window is not index 0. For example, in Unreal, when running in the editor the framebuffer index of the preview window is 50, not 0.
Suggest adding a new callback to OSVR_OpenGLToolkitFunctions that makes it possible to specify an alternate framebuffer. Either a callback similar to
makeCurrent
(i.e.makeFramebufferCurrent
or similar) or a function that returns the desired framebuffer.