PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

ProcessNextFrame

I looked at some messages in this forum and noticed that people all around recommend you to only run surface-related functions in the ProcessNextFrame() function. Now I wonder, why? (consider that I'm not using CGapiApplication)
If you're not using the CGapiApp framework then it doesn't matter. The reason I would recommend doing all graphics related things in ProcessNextFrame is because it centralizes all video memory accesses to one area and makes it much cleaner to manage. Specifically it insures your graphics are going to be updated before they're blitted. Since CGapiApp uses a seperate thread for screen updates it uses ProcessNextFrame to make sure this happens.

Hope that makes sense.
Yep, as Hosed says, the main reason is a guaranteed flip( ) after processing each frame and its running on its own thread. The CGapiApplication framework is pretty clean and well thought out.