Skip to content

Instantly share code, notes, and snippets.

@lg3bass
lg3bass / ofGetAppPtrExample.md
Created June 8, 2017 12:47 — forked from jmsaavedra/ofGetAppPtrExample.md
example use of ofGetAppPtr()

###ofGetAppPtr() example

from a .cpp file, for example, "particle.cpp" you can do two things:

  • a) include "ofApp.h" (so you know what's inside the ofApp)
  • b) cast the ofGetAppPtr as a ptr

you can't include ofApp.h inside another .h file, as you would recursive includes (ie, ofApp includes particle, particle includes ofApp), but putting it in the .cpp is fine.