ES Recruitment Drive
Here is how that error shows up in the code I was trying to use:

I am using OpenFrameworks and ofxPostProcessing. The postprocessing stuff basically just wraps some shaders and abstracts their use in OpenFrameworks.

The problem happens in an ofxPostProcessing class that extends an abstract class from OpenFrameworks. PostProcessing extends ofBaseDraws defined in ofBaseTypes.h.


ofBaseDraws


PostProcessing.h
PostProcessing.cpp

These are supposed to be the implementations of the abstract methods in ofBaseDraws. I don't know if the presence or lack of a const qualifier is part of the function signature. There is not a const qualifier on the abstract class method defintions. Taking the const qualifier off the PostProcessing stuff allows it to build.

PostProcessing.h



Here is where the compiler flags the error where draw is called on the frame buffer reference raw and the other draw call on the ping pong frame buffer.

PostProcessing.cpp

I guess this is an error relating to the fact that you can't call non const methods from inside a const function.
But looking at the ofBaseTypes.h, draw(x,y,w,h) is indeed defined as a const method.
Can you post the errors you get?
Edit: Sorry, I believe the OpenFrameworks source I have is older than what is on the Github in my link. Mine is the latest release tag (0073). This link shows the version of ofBaseTypes.h that I have. Note lack of const.

The errors are:
../../../addons/ofxPostProcessing/src/PostProcessing.cpp|162|error: passing ‘const ofFbo’ as ‘this’ argument of ‘virtual void ofFbo::draw(float, float, float, float)’ discards qualifiers [-fpermissive]|

and same basic thing on the next line

../../../addons/ofxPostProcessing/src/PostProcessing.cpp|163|error: passing ‘const ofFbo’ as ‘this’ argument of ‘virtual void ofFbo::draw(float, float, float, float)’ discards qualifiers [-fpermissive]|

If I remove the const qualifier from both draw methods in the PostProcessing class and try to use it, it complains about me trying to declare a variable of an abstract type.

Apparently the const qualifier is part of the method signature, so getWidth and getHeight do not properly override the base class because they include that qualifier and the abstract methods do not. In this case, not all abstract methods are implemented so the subclass is abstract. It works if the qualifier is removed on those as well.
Last edited by RBB; Jun 7, 2015 at 04:50 PM.
I know perl so if you guys need any text manipulated thats about all im good for. I'm also the king of regexing and obfuscated code.

Also this is the thread were Fear learned what a class was l0l
i created the ??? emoji
like a lighter bitch we ignit