-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
iOS bug drawing with FBO and ofSetOrientation. #5951
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The black triangle only seems to come up if you are drawing in non default orientation > window width. |
Hi, This is what I got when I run your code using the latest nightly build from today. EDITED: @danoli3 Thanks, I forgot to fix main.mm. Here's what I got now. |
? |
Yep that looks right, if you tilt simulator to the home button on the right side too? |
@danoli3 Yes, it looks the same when I tilt it. |
@danoli3 @cuinjune - I just tried again with the nightly and the issue is still there. More minimal example that doesn't require touch:
|
@ofTheo I copied your code and now I could get the issue. |
Here is a gif showing how even a ofScale where the fbo is drawn greater than the window size causes issues. Code to reproduce below:
|
Thanks for confirming @cuinjune Wondering if it might have something to do with the viewport? |
@cuinjune @danoli3 - fyi it doesn't seem to happen when hardware orientation is set to true. Also I am not sure if this is right but currently OF_ORIENTATION_90_RIGHT results in two different phone orientations depending on whether hardware or software orientation is enabled: Notice the different phone orientations in the two images below - pinging @julapy too. |
okay one more clue: Setting
At the top of draw fixes it. Though having this:
doesn't. Really, weird. |
Also if you do:
before drawing then there is no issue. Maybe its a glm issue mixing with the iOS stuff? |
With the new test code @ofTheo I was able to re-produce this on the Xcode 9.3 11.3 Simulator. However I also tested my physical hardware (iPhone 6S) and this bug does NOT occur. Simulator Only Bug. |
i was thinking that it could be some weird thing with how we bake the orientation in the perspective matrix but it doesn't happen in other platforms so i don't think is related. is there any difference on how we set orientation in iOS and desktop? |
Still no luck tracking this down on my end. I can dig in later this week - but if this is holding up the release I am good to go without it. |
ok, i still need to recompile the raspberry pi libraries with a newer compiler version which might take a few days so no worries but i'll take it into account and we can make the release once everything else is solved if this is not yet working. it's really weird that it would only happen in one platform and specifically in the simulator |
I'll later tonight test all my devices, just to be sure. Only tested iPhone
6s so far.
…On 10 April 2018 at 05:18, arturo ***@***.***> wrote:
ok, i still need to recompile the raspberry pi libraries with a newer
compiler version which might take a few days so no worries but i'll take it
into account and we can make the release once everything else is solved if
this is not yet working. it's really weird that it would only happen in one
platform and specifically in the simulator
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5951 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAytHJPAlBCU4NBm9dOW12-t0GsOSvp2ks5tm7QBgaJpZM4TI9ek>
.
|
Yeah Simulator Only! Tested DevicesiPad 2 (Non-Retina) - iOS 9.3.5 |
Thanks for testing @danoli3 ! Curious if you have any thoughts on: |
Hey @ofTheo I've just tested and couldn't reproduce the issue. |
Found a different bug which prevents drawing on iOS except in Portrait mode.
It looks like when FBOs are being drawn in landscape mode they are being drawn backwards somehow? There is a big black triangle over part of the image.
This is what it looks like if you have ofSetOrientation(OF_ORIENTATION_90_RIGHT) set in ofApp::setup or if you just have it before the draw call ( you can even setup the fbo with no orientation set and if you have ofSetOrientation(OF_ORIENTATION_90_RIGHT) before fbo::draw it causes this issue ).
This is what it looks like if you have ofSetOrientation(OF_ORIENTATION_DEFAULT); before the draw call or if you don't set orientation anywhere in the app.
I think this is to do with the vFlip and or matrix stuff
https://github.com/openframeworks/openFrameworks/blob/master/libs/openFrameworks/utils/ofMatrixStack.cpp#L49
If I setup the app this way:
( notice the false flag for ofSetOrientation vFlip )
This produces:
The text was updated successfully, but these errors were encountered: