@p1r4t3b0y wrote:
Hi everybody,
I’m confused by the behaviour of the following, rather simple script:
ofApp.h :
#pragma once #include "ofMain.h" class ofApp : public ofBaseApp{ public: void setup(); void update(); void draw(); int x,; };
ofApp.cpp :
#include "ofApp.h" //-------------------------------------------------------------- void ofApp::setup(){ ofBackground(0); ofSetBackgroundAuto(false); x = 0; } //-------------------------------------------------------------- void ofApp::update(){ x += 10; } //-------------------------------------------------------------- void ofApp::draw(){ ofSetColor(255); ofDrawCircle(x, 10, 10); }
Somehow it doesn’t seem to start drawing the first circle at (x: 10, y: 10), where it would touch the upper and right window border of the app?
My drawing coordinates seem to be on point! What am I missing here?
Thanks.
Posts: 4
Participants: 2