ofxFx : can't get ofxFluid to work outside of example

I wanted to use ofxFluid for a project, but I’m running into a strange issue. The ofxFluid example compiles fine here ( vs2010 ) but when I copy all the code and move it into my own class all I see is the obstacles but no fluid. All the other examples work fine when I copy the code into my class. Even at the most verbose log settings I don’t get any warning of anything going wrong.

The only other issue I have (I think unrelated but mentioning it for completeness) is that I have to comment out the following line in ofxFx.h

#include “transformers/ofxKaleidoscope.h”

otherwise I get the following error:

1>c:\of_v0071_vs2010_release\addons\ofxfx\src\transformers/ofxKaleidoscope.h(65): error C3861: ‘MIN’: identifier not found

strangely I don’t have to do this when I just compile the existing example, works fine.

Any thoughts appreciated

Hello Robotfunk,

Can You send me your class maybe I could figurate it out what’s wrong.



it’s probably a matter of redefinition , ofxk might including a header file for the second time thus creating two class/struct/whatever declarations try using ifndef before including all the files that ofxkaleidoscope includes , or try a different architecture in your code

Hi,patricio.How can we set the background color in ofxFluid?

1 Like

@Wenzy90 have you ever found a solution for setting the background color?

Combining ofxFluid with alphaMaskingShaderExample did the trick.
Just insure to call it in this order


1 Like