OK, I'm gonna ramble a bit here but perhaps some of you knowledgeable people can help me ... :-) please
On my zooming in map screen, I noticed that when it first appears and begins to zoom there is a jerk during the zoom in anim. This is caused because the first frame takes longer to draw than the rest and the delta time code "catches" up and jumps ahead a bit when drawing the second frame. Then all other frames are fine.
So why is there a delay drawing the first frame?
I found a similar thing in BlitzPlus and it's because the image is held in RAM and the first time it's drawn it get's "uploaded" to the video card VRAM before it's drawn. Then each subsequent time, providing that the image hasn't been edited, it just draws straight from VRAM (no upload required) so it's faster.
My understanding of BMax was that it didn't need to do this (unless you are using pixmaps) because all the images are in VRAM anyway.
However, I made a change to my code where I draw the first frame but don't call flip (so it can't be seen) and then I do it properly with flip and this seemed to resolve the jerk problem. This infers that there is some kind of caching/optimisation going on when the images are first drawn. Is that the video card or BMax? Or am I deluding myself and I'm seeing the jerk (and disappearace of it after a dummy frame is drawn) due to some other issue with my code.
Anyone know anything about this and the possible reasons why it may occur? I'd really like to have some standard code in place that optimises the graphics for each screen, or a game level, so that's it's all ready to draw at top speed the first time it's used without any delay, that would be cool.
Thanks in advance for any advice, knowledge, speculation etc ;-)
On my zooming in map screen, I noticed that when it first appears and begins to zoom there is a jerk during the zoom in anim. This is caused because the first frame takes longer to draw than the rest and the delta time code "catches" up and jumps ahead a bit when drawing the second frame. Then all other frames are fine.
So why is there a delay drawing the first frame?
I found a similar thing in BlitzPlus and it's because the image is held in RAM and the first time it's drawn it get's "uploaded" to the video card VRAM before it's drawn. Then each subsequent time, providing that the image hasn't been edited, it just draws straight from VRAM (no upload required) so it's faster.
My understanding of BMax was that it didn't need to do this (unless you are using pixmaps) because all the images are in VRAM anyway.
However, I made a change to my code where I draw the first frame but don't call flip (so it can't be seen) and then I do it properly with flip and this seemed to resolve the jerk problem. This infers that there is some kind of caching/optimisation going on when the images are first drawn. Is that the video card or BMax? Or am I deluding myself and I'm seeing the jerk (and disappearace of it after a dummy frame is drawn) due to some other issue with my code.
Anyone know anything about this and the possible reasons why it may occur? I'd really like to have some standard code in place that optimises the graphics for each screen, or a game level, so that's it's all ready to draw at top speed the first time it's used without any delay, that would be cool.
Thanks in advance for any advice, knowledge, speculation etc ;-)