Hi, this block is awesome, worked right away. One thing:
If I enter fullscreen, the mirror texture is blitted into the backbuffer at the same resolution as the original window, occupying a small fraction of the actual window.
I worked around this by modifying the constructor to use the default display dimensions for the mirror texture,
initializeMirrorTexture(app::getWindow()->getDisplay()->getSize());
and the blit code to respect this difference:
GLint src_w = mMirrorTexture->OGL.Header.TextureSize.w;
GLint src_h = mMirrorTexture->OGL.Header.TextureSize.h;
const ivec2 windowsize = app::getWindowSize();
GLint dst_w = windowsize.x;
GLint dst_h = windowsize.y;
glBlitFramebuffer( 0, src_h, src_w, 0,
0, 0, dst_w, dst_h,
GL_COLOR_BUFFER_BIT, GL_LINEAR );
Seems to work OK, but I'm not sure if this is the ideal solution.
BTW I would also really like to be able to blit the left or right eye texture, because sometimes the mirror screen is better without the Rift distortions etc. applied. Is there a way to do this?
Thanx