Hello!
I have a “View” class which needs access to the drawing functions, like ofCircle, ofFill, etc. What I intend to do is something like this:
int main( ) {
ofAppGlutWindow window;
ofSetupOpenGL(&window, 1024,768, OF_WINDOW);
ofRunApp( new testApp());
}
void testApp::draw() {
// Elsewhere I declare view as type View
view.DrawSomething();
}
and…
void View::DrawSomething() {
ofSetColor(255,130,0);
ofCircle(100,400,10);
}
Currently, my View class doesn’t know about ofSetColor or ofCircle. What’s the most graceful way of giving it access to these drawing functions? I’m wrote the beginnings of an MVC style application in Processing and I’m porting it over. In Processing, my custom classes somehow magically had access to the drawing functions.
Thanks!
- Bret