News for hackers. Stuff that matters.
Re:Apple's CVDisplayLink Doesn't Link to Your Display by seandougall on Sunday December 10, 2017 @12:04PM (#15892266)
If you set the swap interval to 1, my recollection is that glFlush() (or -[NSOpenGLContext flushBuffers]) will block until the frame is presented. I’ve never relied on that behavior, but I’ve always wondered if the display link timer was even necessary, or if you could just use a while loop.
Re:Apple's CVDisplayLink Doesn't Link to Your Display by jchb on Sunday December 10, 2017 @08:22PM (#15894551)
What's the scenario where you would want to do that? I understand there's a (theoretical?) scenario where you want to minimise latency between screen rendering (or input handling?) and presentation. But if you use double buffering, which a while loop that block until the frame is presented, then the CPU will sit idle while the GPU is doing it's work. Instead of preparing the next frame after that - which may result in the CPU preparing the next screen too late if the scene complexity is fluctuating.