#include <revolution/vi.h>
u32 VIGetRetraceCount(void)
None.
The number of retrace interrupts.
This function returns how many retrace interrupts have occurred since the VIInit function was called.
The following code shows how to achieve 30Hz rendering using this function:
VIWaitForRetrace(); // Just to make sure the first frame starts
// from the very beginning of the field.
while(1) {
count = VIGetRetraceCount();
// rendering
while (VIGetRetraceCount() == count)
;
VISetNextFrameBuffer(nextbuffer);
VIFlush();
VIWaitForRetrace();
}
2006/03/01 Initial version.
CONFIDENTIAL