@chrisoffner3d wrote:
Hi everyone, I’m very much new to OF and struggling with trying to draw to my screen pixel by pixel.
I’m running my app inOF_FULLSCREEN
and have:ofImage theScreen; int pixelCount;
and
void ofApp::setup() { ofBackground(0); pixelCount = ofGetWidth() * ofGetHeight(); theScreen.grabScreen(0, 0, ofGetWidth(), ofGetHeight()); } // ... void ofApp::draw() { for (int k = 0; k < pixelCount; k++) { theScreen.setColor(k, ofColor(ofRandom(255), ofRandom(255), ofRandom(255))); } theScreen.update(); theScreen.draw(0,0, ofGetWidth(), ofGetHeight()); }
Yet the resulting image (static noise) only covers the top quarter of my screen:
Any idea what I’m doing wrong here?
Posts: 2
Participants: 2