this is my one, and the colors are not moving :
ofApp.h :
#pragma once
#include "ofMain.h"
class ofApp : public ofBaseApp{
public:
void setup();
void update();
void draw();
void keyPressed(int key);
void keyReleased(int key);
void mouseMoved(int x, int y);
void mouseDragged(int x, int y, int button);
void mousePressed(int x, int y, int button);
void mouseReleased(int x, int y, int button);
void mouseEntered(int x, int y);
void mouseExited(int x, int y);
void windowResized(int w, int h);
void dragEvent(ofDragInfo dragInfo);
void gotMessage(ofMessage msg);
vector<int> x;
vector<int> y;
vector<int> sizeA1;
vector<int> sizeA2;
ofColor colorsHD[7];
};
ofApp.cpp :
#include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup(){
ofBackground(255);
//random coordinates
for(int i = 0; i < 1000000; i++){
x.push_back((int)ofRandom(0,ofGetWidth()));
y.push_back((int)ofRandom(0,ofGetHeight()));
//brush sizes
//brush 1
sizeA1.push_back((int)ofRandom(3,6));
sizeA2.push_back((int)ofRandom(3,6));
}
//color arrays
//high density colors
colorsHD[0] = ofColor(62, 101, 81);
colorsHD[1] = ofColor(33, 87, 50);
colorsHD[2] = ofColor(45, 93, 53);
colorsHD[3] = ofColor(24, 83, 51);
colorsHD[4] = ofColor(31, 60, 52);
colorsHD[5] = ofColor(26, 79, 67);
colorsHD[6] = ofColor(48, 95, 48);
}
//--------------------------------------------------------------
void ofApp::update(){
}
//--------------------------------------------------------------
void ofApp::draw(){
for(int i = 0; i < 500000; i++){
int indexColor = i % sizeof(colorsHD);
ofPushStyle(); // contains the style between push and pop
ofSetColor(colorsHD[indexColor]);
ofDrawEllipse(x[i], y[i], sizeA1[i], sizeA2[i]);
ofPopStyle();
}
}
//--------------------------------------------------------------
void ofApp::keyPressed(int key){
}
//--------------------------------------------------------------
void ofApp::keyReleased(int key){
}
//--------------------------------------------------------------
void ofApp::mouseMoved(int x, int y){
}
//--------------------------------------------------------------
void ofApp::mouseDragged(int x, int y, int button){
}
//--------------------------------------------------------------
void ofApp::mousePressed(int x, int y, int button){
}
//--------------------------------------------------------------
void ofApp::mouseReleased(int x, int y, int button){
}
//--------------------------------------------------------------
void ofApp::mouseEntered(int x, int y){
}
//--------------------------------------------------------------
void ofApp::mouseExited(int x, int y){
}
//--------------------------------------------------------------
void ofApp::windowResized(int w, int h){
}
//--------------------------------------------------------------
void ofApp::gotMessage(ofMessage msg){
}
//--------------------------------------------------------------
void ofApp::dragEvent(ofDragInfo dragInfo){
}
++
P