ofxMSAFluid gives FluidDrawerBase::isFluidReady() - No fluid

Hello everyone,

I’m trying to run the example code from the MSAFluid addon on an iPad. I pulled all the code from Github, either

http://github.com/openframeworks
or
http://github.com/memo/msalibs

I started with an emptyUniversalExample project and added the code from the MSAFluid addon. Then, I added the dependencies:

MSACore
MSATimer
ofxXmlSettings
ofxMSAInteractiveObject

After a few hacks, I was able to get the project to compile. However, when I try to build-and-run on the iPad, the splash screen shows up, but then I get:

FluidDrawerBase::isFluidReady() - No fluid solver
2010-10-05 03:46:26.662 emptyUniversalExample[1483:207] Creating OpenGL ES2 Renderer
2010-10-05 03:46:26.687 emptyUniversalExample[1483:207] Failed to load vertex shader
2010-10-05 03:46:26.697 emptyUniversalExample[1483:207] Failed to compile vertex shader
2010-10-05 03:46:26.709 emptyUniversalExample[1483:207] OpenGL ES2 failed
2010-10-05 03:46:26.890 emptyUniversalExample[1483:207] Creating OpenGL ES1 Renderer

As a relative newbie to all this, does anyone have any tips on where I can start to try to figure out what’s wrong here?

Thank you,
Kyle

What happens when you manually check fluidDrawer->isFluidReady()? You would need to make it public to do so.

FluidDrawerBase::isFluidReady() - No fluid solver

at app start is normal on the example I think. At least, I get that message but the fluid works fine. Can’t say I’m seeing a super speed improvement on the iPad over the old version though.

Hi DavidDC,

Thank you for your assistance. I made isFluidReady() public and it’s returning true just before the exception is thrown:

  
FluidDrawerBase::isFluidReady() - No fluid solver  
2010-10-14 00:54:58.289 emptyUniversalExample[855:207] Creating OpenGL ES2 Renderer  
2010-10-14 00:54:58.313 emptyUniversalExample[855:207] Failed to load vertex shader  
2010-10-14 00:54:58.317 emptyUniversalExample[855:207] Failed to compile vertex shader  
2010-10-14 00:54:58.320 emptyUniversalExample[855:207] OpenGL ES2 failed  
2010-10-14 00:54:58.453 emptyUniversalExample[855:207] Creating OpenGL ES1 Renderer  
is fluid ready? TRUE  
Program received signal:  “EXC_BAD_ACCESS”.  

The debugger ends up pointing to the following line:

  
glDrawArrays(GL_LINES, 0, MAX_PARTICLES * 2);  

in the ParticleSystem::updateAndDraw( bool drawingFluid ) method of ParticleSystem.cpp.

Were you able to get the fluid example app running on your iPad? If so, do you remember what steps you took to run it?

Thanks,
Kyle

Hi Kyle,

Well the good news is yes I did get it running. The bad news is that I completely gutted it to do so. I removed all the GUI and particle system references. I was only interested in the fluid and didn’t want to wrestle with more than I had to. So probably not the answer you were looking for!

DavidDC,

Thanks for letting me know. I was wondering if I was doing something obvious wrong. But, it sounds like that may not be the case.

I’ll take a closer look when I have more time (and urgent need) to do so.

Much appreciated for the assistance.

Regards,
Kyle

I had a closer look at this last week. The hang on GL_LINES is due to the app not taking the alpha channel into account. Add alpha code to particle::update() and it will work.

ie something like:

  
	  
*colour_buffer++ = color.r;  
*colour_buffer++ = color.g;  
*colour_buffer++ = color.b;  
*colour_buffer++ = color.a;  
	  
*colour_buffer++ = color.r;  
*colour_buffer++ = color.g;  
*colour_buffer++ = color.b;  
*colour_buffer++ = color.a;  

I dont get it to work. Can you give some more info about what to do?

I have the same problem with MSAFluid trying to run on iPad :frowning:
I can’t get it to work !!
The debugger end here: glDrawArrays(GL_LINES, 0, MAX_PARTICLES * 2);
Help please …!!!