Skip to content
This repository was archived by the owner on Dec 31, 2020. It is now read-only.
This repository was archived by the owner on Dec 31, 2020. It is now read-only.

mirrored mode doesn't adapt to changing window size (e.g. fullscreen) #5

@grrrwaaa

Description

@grrrwaaa

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions