I am currently working on a c++ program using OpenXR with OpenGL.
I don’t really have experience with OpenGL but with the help of the OpenXR example I managed to render everything that I wanted into VR.
I have one framebuffer per eye, and then 3 more for layers (crosshair/menu) that are displayed with different button presses (which is done in VR with xrEndFrame).
The problem is that I want to mirror everything also onto the computer screen.
Most of it was simple because I just used glBlitNamedFramebuffer to mirror one of the eye framebuffers onto the 0/default framebuffer so it’s displayed.
But i can’t use this method for the layers, as it is just in 2d, and the position of for example the crosshair is important.
I can draw a quad to the position i want it to be, but i don’t know how i can copy the content of the framebuffer onto the quad.
I thought maybe glReadPixels might help, but that seemed rather inefficient.
dings is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.