antoniomechas / ofxParticleSystemGPU

Particle system in GPU with multitexture
39 stars 7 forks source link

osx? #1

Open antimodular opened 9 years ago

antimodular commented 9 years ago

looks super interesting. do you know if this would work on OS X too? i am getting compile errors in the ofxParticaleSystemGPU.cpp

/Applications/of_v0.8.4_osx_release/addons/ofxParticleSystemGPU/src/ofxParticleSystemGPU.cpp:63:25: Expected a class or namespace
antoniomechas commented 9 years ago

Hello antimodular,

It should work in osx, I can't test as I'm on Windows 7.

Could you please post the entire compile error so I can have a look? Line 63 looks right to me.

antimodular commented 9 years ago

here screen shots: https://www.dropbox.com/s/snjdtjeqaox2924/Screen%20Shot%202015-04-19%20at%203.01.25%20PM.png?dl=0 https://www.dropbox.com/s/yharkm8mre0c1ro/Screen%20Shot%202015-04-19%20at%202.52.33%20PM.png?dl=0 here the list of error: https://gist.github.com/antimodular/d751f96cdc7d6ade303b

seems to me it has problems with DataTextureIndex and DynamicTextures enumeration

antoniomechas commented 9 years ago

Hello,

It seems to be realated the way OSX handles enums.

I have changed them to be integer... update from the repo and try to compile again.

2015-04-19 20:56 GMT+02:00 antimodular notifications@github.com:

here a screen shot: ( https://www.dropbox.com/s/yharkm8mre0c1ro/Screen%20Shot%202015-04-19%20at%202.52.33%20PM.png?dl=0 )

here the list of error: https://gist.github.com/antimodular/f3ab83093a59f9c75881

— Reply to this email directly or view it on GitHub https://github.com/antoniomechas/ofxParticleSystemGPU/issues/1#issuecomment-94305153 .

       _.      z z
  .__/|_. z z          z
    -")\                      z
__ //  )
  ""/  \-=,,._
    `;;'   `'"`    -.__             ___   __
                        " ~ -  __"""         "" --_

Blog: http://tronioamericas.blogspot.com
antimodular commented 9 years ago

thanks for looking in to this. i made some changes which solved the compile errors. see here two examples of removing the ::

//particleSystem.loadIntoTexture(ofxParticleSystemGPU::DynamicTextures::COLOR_STATIC, &img.getTextureReference());
    particleSystem.loadIntoTexture(particleSystem.COLOR_STATIC, &img.getTextureReference());

   // s.numColorbuffers = DataTextureIndex::LAST_INDEX;
    s.numColorbuffers = LAST_INDEX;
antimodular commented 9 years ago

the starts running but the console has shader errors.

i am on OS X 10.10 the error seems to be related to version330 of the shader https://gist.github.com/antimodular/a3ef67c49c833eb6fc0a

antimodular commented 9 years ago

i also tried running your addon on windows 8 under code blocks. i had to remove the :: and such just like in OS X to get it to compile.

the app starts but the screen stays black. the ofxgui works and the debug video cam view works. here is the console print out: https://gist.github.com/antimodular/ceeff294bb97bc61763c

thanks for your help. your addon looks super interesting that's why i am trying to get it to work for me :)

antoniomechas commented 9 years ago

Could you please try first with the original addon from Neil Mendoza:

https://github.com/neilmendoza/ofxGpuParticles

I forked from that one... maybe will be easier to troubleshoot from there.

I'm on Windows 7 with a Nvidia 675MX, I think this shaders need a good graphics card to work...

By the way, are you Mexican?

2015-04-20 15:50 GMT+02:00 antimodular notifications@github.com:

i also tried running your addon on windows 8 under code blocks. i had to remove the :: and such just like in OS X to get it to compile.

the app starts but the screen stays black. the ofxgui works and the debug video cam view works. here is the console print out: https://gist.github.com/antimodular/ceeff294bb97bc61763c

thanks for your help. your addon looks super interesting that's why i am trying to get it to work for me :)

— Reply to this email directly or view it on GitHub https://github.com/antoniomechas/ofxParticleSystemGPU/issues/1#issuecomment-94456152 .

       _.      z z
  .__/|_. z z          z
    -")\                      z
__ //  )
  ""/  \-=,,._
    `;;'   `'"`    -.__             ___   __
                        " ~ -  __"""         "" --_

Blog: http://tronioamericas.blogspot.com
antimodular commented 9 years ago

ofxGpuParticles works just fine. on my OS X laptop.

Antimodular is an artist studio headed by Rafael Lozano-Hemmer, who is Mexican. I am Stephan, and am German.

antoniomechas commented 9 years ago

Ok... It could be related to the support of geometry shaders by your card, maybe.

Could you try to run the openframeworks example located on "examples\gl\gpuParticleSystemExample" and check if it works? I think the card needs to support opengl EXT_geometry_shader4 extension.

2015-04-21 0:18 GMT+02:00 antimodular notifications@github.com:

ofxGpuParticles works just fine. on my OS X laptop.

Antimodular is an artist studio headed by Rafael Lozano-Hemmer, who is Mexican. I am Stephan, and am German.

— Reply to this email directly or view it on GitHub https://github.com/antoniomechas/ofxParticleSystemGPU/issues/1#issuecomment-94582317 .

       _.      z z
  .__/|_. z z          z
    -")\                      z
__ //  )
  ""/  \-=,,._
    `;;'   `'"`    -.__             ___   __
                        " ~ -  __"""         "" --_

Blog: http://tronioamericas.blogspot.com
antimodular commented 9 years ago

that works fine too on osX 10.10 with OF 0.8.4

antoniomechas commented 9 years ago

Ok,

I'll take a deeper look into this, other user reported same behaviour. I think my Nvidia card is more relaxed than others and does not complaint about the shaders...

2015-04-21 14:35 GMT+02:00 antimodular notifications@github.com:

that works fine too on osX 10.10 with OF 0.8.4

— Reply to this email directly or view it on GitHub https://github.com/antoniomechas/ofxParticleSystemGPU/issues/1#issuecomment-94777138 .

       _.      z z
  .__/|_. z z          z
    -")\                      z
__ //  )
  ""/  \-=,,._
    `;;'   `'"`    -.__             ___   __
                        " ~ -  __"""         "" --_

Blog: http://tronioamericas.blogspot.com
antoniomechas commented 9 years ago

Hello,

As some other reported, it should work if you disable opticalFlow in the settings... I'm not sure why that happens as I'm not able to reproduce the issue on my system...

http://forum.openframeworks.cc/t/gpu-particle-system-with-multitexturing-and-optical-flow/18384/5

Regards,

Antonio.

2015-04-23 12:13 GMT+02:00 antoniomechas . antoniomechas@gmail.com:

Ok,

I'll take a deeper look into this, other user reported same behaviour. I think my Nvidia card is more relaxed than others and does not complaint about the shaders...

2015-04-21 14:35 GMT+02:00 antimodular notifications@github.com:

that works fine too on osX 10.10 with OF 0.8.4

— Reply to this email directly or view it on GitHub https://github.com/antoniomechas/ofxParticleSystemGPU/issues/1#issuecomment-94777138 .

       _.      z z
  .__/|_. z z          z
    -")\                      z
__ //  )
  ""/  \-=,,._
    `;;'   `'"`    -.__             ___   __
                        " ~ -  __"""         "" --_

Blog: http://tronioamericas.blogspot.com

       _.      z z
  .__/|_. z z          z
    -")\                      z
__ //  )
  ""/  \-=,,._
    `;;'   `'"`    -.__             ___   __
                        " ~ -  __"""         "" --_

Blog: http://tronioamericas.blogspot.com
ImanolGo commented 9 years ago

Hello,

I´m also having the same problem with the the error related to version 330 of the shader. If I set ofSetCurrentRenderer(ofGLProgrammableRenderer::TYPE), I get errors not able to compile version 120.

Is it possible to support both versions at the same time?

Imanol

antoniomechas commented 9 years ago

Hi ImanolGo,

Currently I'm working on it... it seems it is not working for most of the people, probably related to the geometry shader passing the values of coordinates and textures to the fragment shader. For me it is working on a Windows machine with an nVidia GTX675MX... I'll update when I find out the issue... Regards! Antonio

ImanolGo commented 9 years ago

Hi Antonio,

Thanks and good luck!

technolife commented 9 years ago

Hi,

Same problem here, shaders can't compile.

Cyril

pierrep commented 8 years ago

Had the same problem as everyone here, running on Windows 8 and Nvidia GTX660. I got it to run by adding "#version 120 compatibility" to the render.frag shader file. I didn't look into it too much further as I was just wanting to check this out.

joaodafonseca commented 8 years ago

Having the same problem described above by @ImanolGo. Shaders are not compiling. Using Opengl #330 version I have errors related to version #120.

Didi anyone manage to run the example under osx?

demilsson commented 8 years ago

I also have this issue on OS X. Would be really interested in a solution.

David

kasparsj commented 5 years ago

+1