I’m working on OpenVR. The one way communication is done - I can get rotation and position of person wearing the oculus.
Now is time to send the visuals to the hmd. I already have the stereo rendering implemented, but it goes on the screen/ monitor like here gnometech.com/torque/images/ … dering.jpg
What I wold like to do is to copy the screen as a texture, so I could send it to the vr googles.
I tried to do it like that. But it is upside down and It stops to render on screen
renderTexture = Texture2D();
renderTexture.SetSize(1920, 1080, GetRGBFormat(), TEXTURE_RENDERTARGET);
renderTexture.filterMode = FILTER_BILINEAR;
RenderSurface@ surface = renderTexture.renderSurface;
surface.updateMode=SURFACE_UPDATEALWAYS;
surface.viewports[0] = renderer.viewports[0];
surface.viewports[1] = renderer.viewports[1];
Is there a better way to grab, what’s on screen and have that as a texture(that is accesible by glBindTexture…)?
edit:
Ok just noticed that the upside down view of the texture is not caused by urho but by OpenVR, I’m wondering why