I’ve been displaying video inside a Juce application using OpenGL using the methods glTexImage2D and glDrawPixels. Everything works fine, but sometimes, I’d like to turn the video display off. So, I cleared the screen using glClear(). I would like to call glClear() only once to save CPU cycles, but when I do so, the screen flickers between a cleared black screen and the last frame of video that was displayed. It’s rather strange. I’m not sure where this last frame of video is coming from. I’m definitely not drawing it. So, it’s being stored somewhere and repainted… Does anyone know where this last video frame is being stored and how I can get rid of it?
I am wondering whether this problem is linked to another odd behavior of this application. When I close the application and reopen it without a camera attached, then it shows the last frame of video from the last time the application ran. Don’t ask me where it’s getting it from. I have no idea… This behavior doesn’t actually bother me, but I do wonder whether it’s the same reason why I’m having this flickering problem.