I'm using Texture VRAM updating to do some animations. From what I've learned, I should update Texture VRAM during VBlank period to prevent glitches from happening.
However the data amount is so HUGE that it can't be DMAed into Texture VRAM in a single VBlank period.
So I could notice some ugly "black line" glitches flashing on the screen, which made me very angry.
I then decided to drop fps to 30 to gain some extra timing using the following method:
Code: Select all
...
u64 currentTime=getCurrentMicroSecond();
while(TRUE){
someLogic();
if(getCurrentMicroSecond()-currentTime<16715)swiWaitForVBlank();
glFlush(); // I believe that 3D screen is refreshed only after glFlush() is called
swiWaitForVBlank();
currentTime=getCurrentMicroSecond();
someRender();
updateTextureVRAM();
}
My dear friends, please tell me what I should do to solve this problem. Any suggestion is much appreciated.
And please forgive me for my bad English. You know, a foreign language is never easier than mother tongue...