Hei there, i want to have a colored rect flickering in a specified Hertz-Rate. Lets say 4 Hertz.
so what i did is setup the frameRate to 4:


and in the draw:

if (ofGetFrameNum()%2) {  
	glColor4ub(255, 0, 0, 255);  
} else {  
	glColor4ub(0, 0, 0, 255);  
glRecti(0, 0, 600, 600);  

the problem i have is that sometimes the rect isn’t filled completely - i looks like some v-sync problem (but the frameRate is 4).
probably the solution is pretty simple. thx!

![]( 2011-05-21 um 15.12.35.png)

try with ofSetVerticalSync(true) in your setup method

thx! somehow i thought the vsync is on by default.

do you got a better solution to make a flickering on a specified hertz number ?