When i run the following program ,the program doesn’t run as expected it only works fine when i wake my laptop from sleep when the program is still running in the background.
Basically i was trying to make a screen saver that i saw in raspberry pi which randomly generated hues of colour on 9 tiles of the screen .
#include "testApp.h"
float R,G,B;
//--------------------------------------------------------------
void testApp::draw(){
R = ofRandom(0,255);
G = ofRandom(0,255);
B = ofRandom(0,255);
ofSetColor(R, G, B);
ofFill();
ofRect(0, 0, ofGetWidth()/3, ofGetHeight()/3);
ofSetColor(R,G,B);
ofFill();
ofRect(ofGetWidth()/3 +5, 0, ofGetWidth()/3, ofGetHeight()/3);
ofSetColor(R, G, B);
ofFill();
ofRect(2*ofGetWidth()/3 +10, 0, ofGetWidth()/3, ofGetHeight()/3);
ofSetColor(R, G, B);
ofFill();
ofRect(ofGetWidth()/3 + 5, ofGetHeight()/3 +5, ofGetWidth()/3, ofGetHeight()/3);
ofSetColor(R, G, B);
ofFill();
ofRect(0, ofGetHeight()/3 +5, ofGetWidth()/3, ofGetHeight()/3);
ofSetColor(R, G, B);
ofFill();
ofRect(0, 2*ofGetHeight()/3 +10, ofGetWidth()/3, ofGetHeight()/3);
ofSetColor(R, G, B);
ofFill();
ofRect(2*ofGetWidth()/3 + 10, ofGetHeight()/3 +5, ofGetWidth()/3, ofGetHeight()/3);
ofSetColor(R, G, B);
ofFill();
ofRect(ofGetWidth()/3 + 5, 2*ofGetHeight()/3 +10, ofGetWidth()/3, ofGetHeight()/3);
ofSetColor(R, G, B);
ofFill();
ofRect(2*ofGetWidth()/3 + 10, 2*ofGetHeight()/3 +10, ofGetWidth()/3, ofGetHeight()/3);
}