I want to be able to run my openFrameworks project in fullscreen (or even better, fullscreen on a second monitor or projector) but when I toggle fullscreen it always crashes.
I don’t even really know where to look to fix my problem.
This looks in order to me:
So maybe it is something here, when I scale the image?
//scales the drawn image so to size
imageScale.x = ofGetWidth() / kinect.getWidth();
imageScale.y = ofGetHeight() / kinect.getHeight();
can you post your whole code or the smallest possible code example which crashes? It’s not enough to see from the snippet you posted what might be wrong.
also, what platform are you on when you see the crash?
I’d also suggest taking the empty example and adding ofToggleFullscreen(); to it just to be sure that it works ok.
Thanks for the help! The entire code is here: https://github.com/omarieclaire/closer
What do you mean by platform? I’m using a macbook (2015) and Xcode (8.0). By “crash” I mean it freezes up and I usually end up force-quitting.
I’ll try your suggestion of taking the empty example and seeing if it works.
I don’t have a kinect to test and this is kind of an involved project so it’s hard to see what the problem is.
to debug, I’d try compiling in debug and if the app freezes, hit pause in the debug menu of xcode (or other ide if you are on) :
to see if there’s a specific moment where it’s stuck. you can see the stack trace (you might have to poke around to find the right thread which is stuck)
usual culprits are for loops or while loops where the logic is wrong.
you might also try commenting out all of the inside of your draw call or the inside of your update call to see if it’s one of the other thing that’s freezing, and then bit by bit add code back in till you find out what is causing the issue. Sometimes it might be just a tiny mistake but in a project it’s hard to find.
finally, if you can make a small example which shows the problem this is helpful too – maybe try to simplify things to see the issue. I often find that in the process of simplifying things to make the smallest possible example that shows the problem I find the source of the problem.
hope this helps!
This is really helpful, thank you so much for taking the time to help me solve my problem.
I really appreciate it!!