Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
P3D strange framerate behavior #4846
When I have a simple sketch that uses P3D, many times the framerate seems to hover around 30fps, even if the framerate function framerate(60) is called. However, the framerate moves back up to 60fps under certain conditions. I noticed that the framerate would go back up to 60fps if i had youtube open in some browser, and the browser was open. If youtube wasnt open it would go back down.
I don't understand why this is happening. Since it seemed to get better when a youtube front page tab was open, i assumed there is either something on the site itself that is 'activating' my hardware.
To investigate further, I used the processing video library and tried to run the video example called loop. The idea would be that perhaps the hardware would 'activate' if i forced processing to run a video. After changing the size function to have it be p3D, and then printing the framerate to the screen text("fr: " + frameRate, width/2, 10 ); the same behavior is noted. where the video runs at only round 30fps. (By contrast, the video example would run at 60fps using the standard default renderer.) However, when I hovered my mouse over my webbrowser and moved the mouse between tabs, or over hyperlinks, the fraemrate would be bouncing up and down, slowing down to 30 whenever i stopped movnig the mouse, staying up if i opened a youtube tab and had the browser displaying that.
I don't quite understand what is going on, but I have another laptop that has a different graphics card and was getting the same behavior. I would like to use p3d as it is very good at rendering many objects on the screen at once, but it's a bit annoying that i have to have a webpage open to youtube in the background to make it work.