-
Notifications
You must be signed in to change notification settings - Fork 999
Allow Camera::SetFlipVertical to be used externally for OpenGL #2643
Allow Camera::SetFlipVertical to be used externally for OpenGL #2643
Conversation
…ng it either side of render to texture, i.e. instead of "set and clear" either side of render to texture. (cherry picked from commit 434739d62c99e9328b66c338b7dc57c963b586c6)
If no objections arise, I'll merge it in three days |
for every render target. flipping is toggled
so every other render target is flipped? just looked at the code, and this exists in Render() function, so it's flipped every other frame? |
No, I don't think so. My change toggles the flip camera state either side of the render for OGL. I believe this is equivalent to the original code which sets then clears the flipped state. The purpose of my PR is simply to retain the flipped state of the camera set by the user, which was previously being lost every frame for OGL. |
Yes, the code does not look intuitive. May be add some more comment, that the value restored below. |
Yes, I agree, it's not immediately obvious why it's a toggle or why the restoration is a toggle.
|
(cherry picked from commit 4f1ca6cf8595b230e7ab2473fc37d1c0325a481a)
Yes, the comment is very informative. I get it now. |
Can this PR be merged now? Or are there any outstanding concerns about it? |
Yeah, I tend to say "I'll merge it in 3 days" and forget about it for weeks. |
* Allow Camera::FlipVertical to be used externally for OpenGL by toggling it either side of render to texture, i.e. instead of "set and clear" either side of render to texture. (cherry picked from commit 434739d62c99e9328b66c338b7dc57c963b586c6) * #1 Add explanation comment to previous commit. (cherry picked from commit 4f1ca6cf8595b230e7ab2473fc37d1c0325a481a) Co-authored-by: Chris Denham <chris.denham@logicom.com>
* Allow Camera::FlipVertical to be used externally for OpenGL by toggling it either side of render to texture, i.e. instead of "set and clear" either side of render to texture. (cherry picked from commit 434739d62c99e9328b66c338b7dc57c963b586c6) * #1 Add explanation comment to previous commit. (cherry picked from commit 4f1ca6cf8595b230e7ab2473fc37d1c0325a481a) Co-authored-by: Chris Denham <chris.denham@logicom.com>
* Allow Camera::FlipVertical to be used externally for OpenGL by toggling it either side of render to texture, i.e. instead of "set and clear" either side of render to texture. (cherry picked from commit 434739d62c99e9328b66c338b7dc57c963b586c6) * #1 Add explanation comment to previous commit. (cherry picked from commit 4f1ca6cf8595b230e7ab2473fc37d1c0325a481a) Co-authored-by: Chris Denham <chris.denham@logicom.com>
* Allow Camera::FlipVertical to be used externally for OpenGL by toggling it either side of render to texture, i.e. instead of "set and clear" either side of render to texture. (cherry picked from commit 434739d62c99e9328b66c338b7dc57c963b586c6) * #1 Add explanation comment to previous commit. (cherry picked from commit 4f1ca6cf8595b230e7ab2473fc37d1c0325a481a) Co-authored-by: Chris Denham <chris.denham@logicom.com>
* Allow Camera::FlipVertical to be used externally for OpenGL by toggling it either side of render to texture, i.e. instead of "set and clear" either side of render to texture. (cherry picked from commit 434739d62c99e9328b66c338b7dc57c963b586c6) * #1 Add explanation comment to previous commit. (cherry picked from commit 4f1ca6cf8595b230e7ab2473fc37d1c0325a481a) Co-authored-by: Chris Denham <chris.denham@logicom.com>
* Allow Camera::FlipVertical to be used externally for OpenGL by toggling it either side of render to texture, i.e. instead of "set and clear" either side of render to texture. (cherry picked from commit 434739d62c99e9328b66c338b7dc57c963b586c6) * #1 Add explanation comment to previous commit. (cherry picked from commit 4f1ca6cf8595b230e7ab2473fc37d1c0325a481a) Co-authored-by: Chris Denham <chris.denham@logicom.com>
* Allow Camera::FlipVertical to be used externally for OpenGL by toggling it either side of render to texture, i.e. instead of "set and clear" either side of render to texture. (cherry picked from commit 434739d62c99e9328b66c338b7dc57c963b586c6) * #1 Add explanation comment to previous commit. (cherry picked from commit 4f1ca6cf8595b230e7ab2473fc37d1c0325a481a) Co-authored-by: Chris Denham <chris.denham@logicom.com>
Allow
Camera::SetFlipVertical
to be used externally for OpenGL by toggling it either side of render to texture, i.e. instead of "set and clear" either side of render to texture.The purpose of this pull request is to allow
Camera::SetFlipVertical
to be used for both DirectX and OpenGL to switch into a right handed coordinate system (see #2642).This pull request should not change the behaviour of any application that does not call
Camera::SetFlipVertical
directly. It also should correct the scenario where if the render to texture should not be flipped if the camera is already flipped (hence the toggling of state in the changes)Closes #2642