ofxPostProcessing & OF 0.9.0

I wanna create a multi window app with new GLFW features, and use ofxPostProcessing but the ofBaseDraws structure as changed, and ofxPostProcessing is now out of date.

I would like to understand what i need to do to run this addon with OF 090.

Neil are you in the place :wink:

Any help is welcome !

Maxime

What errors do you get?

I just add “ofxPostProcessing post;” to a empty project with OF 090 - VS2012

  • Impossible to create a abstract classe
    ofxPostProcessing is based on ofBaseDraws, that as changed…

“itg::PostProcessing::draw(float x = (0.0F), float y = (0.0F)) const” est une fonction virtuelle pure
“itg::PostProcessing::draw(float x, float y, float w, float h) const” est une fonction virtuelle pure
“itg::PostProcessing::getWidth” est une fonction virtuelle pure
“itg::PostProcessing::getHeight” est une fonction virtuelle pure

I have try myself, but i’m not good in abstract/virtual/const approach, I come from AS3…

Yes, ofxPostProcessing doesn’t work with oF 0.9.0.
Because ofxPostProcessing inherits from ofBaseDraws, you must define all the pure virtual methods (the ones that end with =0) declared in ofBaseDraws i.e. these methods:

void draw(float x, float y)=0;
void draw(float x, float y, float w, float h)=0;
float getHeight()=0;
float getWidth()=0;

However, the prototype of these methods changed in oF 0.9.0 to:

void draw(float x, float y) const=0;
void draw(float x, float y, float w, float h) const=0;
float getHeight() const = 0;
float getWidth() const = 0;

So you need to make them constant too in ofxPostProcessing in order to match the declarations in ofBaseDraws. If you edit PostProcessing.h and PostProcessing.cpp and add const at the end of the aforementioned methods it will compile.

1 Like

Thx Elaye !

Simply add “const” and not “const=0” as I have done…