Closed faazuthnar closed 5 years ago
Hmm, could this deprecate tcounter
which is currently only used to figure out when a second has passed? Given that the semantics of both are similar, minus the 1-second-reset
Now, I removed time
, which was a confusing name. Instead I made fcounter
not reset every second, and added fcounter_last
, which stores the last frame since the last second or so. I think it makes more sense this way.
fcounter
is a frame counter, and thus varies by framerate and framerate stability - what's the use of using this as a measure of time, when it will be inconsistent without vsync (and even with vsync under adaptive refresh scenarios potentially)?
You're also casting fcounter
(int) to GLfloat
now, that can't be right.
Now i also just noticed that your initial commit had similar semantics regarding counting frames instead of realtime. I thought you wanted a measure of time passed? While framecounters can be used to advance animations & scenes, you will end up with speedups/slowdowns relative to your reference speed on other devices. I think you want a realtime counter.
Alright, I was rushed, I'll look into it further. Thanks
Since this feature is required to implement some visualizer effects that have animations that are not strictly tied to FFT output I will be merging this, but only a variation of the initial commit as it's much cleaner and is not bound to a certain period.
The above commit adds/changes:
"time"
uniform type: #request uniform "time" var
, and#request timecycle 120
, which globally sets the period to be used for time uniforms.stdout
only occur on debug builds, as it's largely useless for the average user.
This is useful for animating stuff not depending on audio for additional visualizations.
This closes my issue: #120