Forum Discussion
jfeh
11 years agoHonored Guest
OpenGL : retrieving the framebuffer of an attached window
Hi, As I mentioned in the midst of another topic, I would like to know if and how it is possible to retrieve the framebuffer's content currently displayed in the Rift at every frame (e.g. using glR...
jfeh
11 years agoHonored Guest
Thanks jherico for confirming my point. It is indeed straightforward to reproduce with a simple test program that renders to optimal texture sizes (returned by ovrHmd_GetFovTextureSize when giving it the optimal FOV stored in location m_hmd->DefaultEyeFov as well as giving it a value of 1.0 for the pixelsPerDisplayPixel) bu with different windows sizes (at very low resolutions, it is kind of a 80's revival for CG :-)).
There is a point that is still not clear in my opinion : when attaching a window to the hmd, is it the content of the window's backbuffer that is copied to the Rift's screen, or vice versa ?
- The SDK states for "ovrHmd_AttachToWindow" :
- However, when looking at the documentation of the flag "ovrHmdCap_NoMirrorToWindow" , it states that
Those 2 statements are in contradiction in my opinion, any one from the technical team at Oculus could shed some light on that point ?
@jherico : given the latest version of the SDK in OpenGL, would you have any recommendation in order to render in the Rift at optimal quality (i.e. backbuffer of 1920*1080), but with mirroring of the 2 distorted views occurring in a window of lesser size (mirroring is mandatory in my case). This latter window would typically be an OpenGL view (e.g. 800*600) encapsulated in a full UI. Without access to the framebuffer of the attached window (which I originally planed to hide), this does not seem feasible with a Direct to Rift approach. Would extended mode be a viable option in your opinion by the way ?
Thanks,
Jeff.
There is a point that is still not clear in my opinion : when attaching a window to the hmd, is it the content of the window's backbuffer that is copied to the Rift's screen, or vice versa ?
- The SDK states for "ovrHmd_AttachToWindow" :
Platform specific function to specify the application window whose output will be displayed on the HMD. This is consistent with what jherico and I observed (quality degrades as window size diminishes).
- However, when looking at the documentation of the flag "ovrHmdCap_NoMirrorToWindow" , it states that
Disables mirroring of HMD output to the window. This may improve rendering performance slightly (only if 'ExtendDesktop' is off).And this implies that rendering is done internally in the Rift and may be copied to the destination window. Unless this only means that a swapBuffer isn't performed on the window's device context.
Those 2 statements are in contradiction in my opinion, any one from the technical team at Oculus could shed some light on that point ?
@jherico : given the latest version of the SDK in OpenGL, would you have any recommendation in order to render in the Rift at optimal quality (i.e. backbuffer of 1920*1080), but with mirroring of the 2 distorted views occurring in a window of lesser size (mirroring is mandatory in my case). This latter window would typically be an OpenGL view (e.g. 800*600) encapsulated in a full UI. Without access to the framebuffer of the attached window (which I originally planed to hide), this does not seem feasible with a Direct to Rift approach. Would extended mode be a viable option in your opinion by the way ?
Thanks,
Jeff.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 1 year ago