"NewManLiving" wrote:
Using the compositor I do not initiate any drawing to the screen that I am aware of. Generally I create, write/modify, destroy and then when all is done I call compositor.drawall and swapbuffers. So it would be the compositor that initiates drawing to the screen. so I am trying to figure out how your solution would apply or perhaps I'm misunderstanding you.
' Update all of your sprites
....
' Now do the screen draw
screen.clear(backgroundColor)
compositor.DrawAll()
screen.SwapBuffers()
' Now do any clean up
...
"RokuMarkn" wrote:
In OpenGL implementations, Finish() calls glFinish(). In DirectFB implementations, it calls WaitIdle(). You can read the documentation for those calls for more detail, but if you don't call Finish, you're relying on timing to ensure that all drawing operations to a bitmap are complete before you use the contents. Depending on the timing of your app, this may well work, but it's risky and if some later change causes timing to change, your code might start failing unexpectedly.
--Mark
"TheEndless" wrote:"NewManLiving" wrote:
Using the compositor I do not initiate any drawing to the screen that I am aware of. Generally I create, write/modify, destroy and then when all is done I call compositor.drawall and swapbuffers. So it would be the compositor that initiates drawing to the screen. so I am trying to figure out how your solution would apply or perhaps I'm misunderstanding you.
Using the compositor, you'd do the same thing. Make all of your compositor/sprite updates before initiating your draw to the screen.' Update all of your sprites
....
' Now do the screen draw
screen.clear(backgroundColor)
compositor.DrawAll()
screen.SwapBuffers()
' Now do any clean up
...
Again, the key is to not clear the screen until after you've completed all updates to the bitmaps you're about to draw to it. It's that screen.clear() that seems to trigger the flaky timing, as that initiates drawing to the screen. Generally speaking, the only change you should need in your code is to move the screen.Clear() to just before the compositor.DrawAll() call.
"NewManLiving" wrote:
Thank you. It seems though, that is what I have been doing except I do not clear the screen as Compositor.SetDrawTo takes an rgbaBackground as an argument. I would guess that it has been clearing the screen as there was never a problem with rendering anything.
"squirreltown" wrote:
… if my timing is based on swapbuffers() which is a minimum of 16 ms then the scary timing …
"EnTerr" wrote:"squirreltown" wrote:
… if my timing is based on swapbuffers() which is a minimum of 16 ms then the scary timing …
Let me make a side point, since this is flat out wrong and I have seen it stated before. swapBuffers() has no minimum, it can be as low as 1 or "0" ms. It can take anywhere between 0 and 17ms for it to get in sync with the video signal, so one can loosely say its MAXIMUM is 17ms.
Ps. Typing on a phone sucks boba pearls
"TheEndless" wrote:
While I appreciate that explanation, this was never an issue until the new home screen UI was released, and it doesn't happen on the Roku 3, ever, which I believe is also OpenGL. It also doesn't explain why it happens even if you're not drawing the particular item to the screen. How could an un-Finished() bitmap that's not even being drawn to the screen cause a tear?
"OpenGL.org wiki" wrote:
Adaptive Vsync
Recent GL drivers implement a new WGL/GLX extension called EXT_swap_control_tear. This extension brings "adaptive vsync" as featured in modern gaming consoles to the PC. Adaptive vsync enables v-blank synchronisation when the frame rate is higher than the sync rate, but disables synchronisation when the frame rate drops below the sync rate. Disabling the synchronisation on low frame rates prevents the common problem where the frame rate syncs to a integer fraction of the screen's refresh rate in a complex scene.
"EnTerr" wrote:
[Adaptive Vsync Info]