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...
jherico
11 years agoAdventurer
"jfeh" wrote:
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 glReadPixels, glCopyTexImage2D etc.)?
SDK is 0.4.4 in OpenGL mode under Windows using the DirectToRift mode ("ovrHmd_AttachToWindow") with client distortion rendering. Basically, I would like to copy the Rift's screen content to the GPU's VRAM (or even better, get the existing OpenGL texture ID if the screen has been filled by texturing a quad in OpenGL).
I'm not clear on what the problem would be here. To distort the image you have to start with a texture that's been rendered. If you want the contents pre-distortion then you already have the handle of the texture you want to read. If you want the post-distortion pixels, then just attach an FBO, render the distortion mesh, and then you have the results in the FBO attached texture. You can then take that texture and render it to a full screen quad on the Rift. This will of course break timewarp. Alternatively, you could render the distortion mesh, and then render it again with timewarp support or use SDK side distortion. The incremental cost of rendering distortion twice is going to be trivial compared to the cost of the rest of the rendering pipeline.
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