Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

Extremely simple task that i can't get to work

$
0
0

@hachem28 wrote:

Super Beginner here. So all I'm trying to do is declare a variable of type ofRectangle or instantiate an object of type ofRectangle(which way is the correct way to say it?) and draw it. But i can't do this simple task., Here's what i have:

in ofApp.h:
ofRectangle player;

in ofApp.cpp:

void ofApp::setup()
{
player.set(100,100,100,100);
}

void ofApp::update(){

}

void ofApp::draw()
{
ofColor(255,0,0);
player;
}

I believe I'm not creating the object correctly, but I've searched everywhere and cannot find how to do it.

Thanks

Posts: 6

Participants: 4

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles