sensics / OSVR-RenderManager

Apache License 2.0
64 stars 45 forks source link

Custom framebuffer callback for OSVR_OpenGLToolkitFunctions #154

Closed JeroMiya closed 8 years ago

JeroMiya commented 8 years ago

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#L1112

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.

JeroMiya commented 8 years ago

Implemented in https://github.com/sensics/OSVR-RenderManager/pull/155