VIGetRetraceCount

C Specification

#include <revolution/vi.h>
u32 VIGetRetraceCount(void)

Arguments

None.

Return Values

The number of retrace interrupts.

Description

This function returns how many retrace interrupts have occurred since the VIInit function was called.

Sample Code

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();
	}

See Also

VIInit

Revision History

2006/03/01 Initial version.


CONFIDENTIAL