openframeworks / openframeworks/openFrameworks
Bug : Orientation, vFlip and viewports
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
I think the line in ofMatrixStack.cpp:
if (vflip){
y = getRenderSurfaceHeight() - (y + height);
}
should be:
if (vflip && !(!doesHWOrientation() && OF_ORIENTATION_90_RIGHT)){
y = getRenderSurfaceHeight() - (y + height);
}
this seems to fix things for me (iPad in horizontal with home button on left, whichi is OF_ORIENTATION_90_RIGHT). but my mind isn't very trained right now to understand all the orientation flags, so advice is welcome
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in libs/openFrameworks/utils/ofMatrixStack.cpp at the linked line and trace how vflip, doesHWOrientation(), and OF_ORIENTATION_90_RIGHT affect viewport coordinates. Reproduce the reported iPad landscape case with the home button on the left, then verify that viewport positioning is correct without breaking other orientations. Done means the orientation-specific viewport behavior is confirmed and covered by the project’s available validation path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100