We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Trying to tutor myself on fluid dynamics. Discovered both older and newer libraries contributed by Thomas Diewald.
This question is about running examples out of diewald_fluid library with option to use GPU (GLSL) context. I have downloaded GLGraphics zip package and moved files around so ~/libraries/codeanticode is seen by P3. I seem to crash on the execution of size() even after setting specific values for width and height. (The third argument remains as GLConstants.GLGRAPHICS.)
Any ideas on proper environment/setup to make this work?
Answers
Can you provide a link to those packages that you download. Also paste below the code your are attempting to run. Make sure you format the code before submitting. In the processing IDE, press ctrl+t. Then copy and paste it below. Select your code and hit ctrl+o. Ensure there is a line above and below your code block.
Kf
I got GLGraphics 1.0 from here: https://sourceforge.net/projects/glgraphics/files/glgraphics/1.0/
It is unzipped to reside in my Processing area as this:
~/libraries/GLGraphics with subdirectories examples, library, reference, src
The library subdir contains GLGraphics.jar.
The src subdir contains codeanticode/glgraphics. I copy the latter up to reside under ~/libraries to satisfy the "import" statement (codeanticode.glgraphics.*) in the fluid2d_basic_GPU_v2 sketch:
Upon "run" I get this crash output:
java.lang.NoClassDefFoundError: processing/opengl/PGraphicsOpenGL$ImageCache at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671) at java.lang.Class.getConstructor0(Class.java:3075) at java.lang.Class.getConstructor(Class.java:1825) at processing.core.PApplet.makeGraphics(PApplet.java:2226) at processing.core.PApplet.createPrimaryGraphics(PApplet.java:2306) at processing.core.PApplet.initSurface(PApplet.java:10553) at processing.core.PApplet.runSketch(PApplet.java:10492) at processing.core.PApplet.main(PApplet.java:10211) Caused by: java.lang.ClassNotFoundException: processing.opengl.PGraphicsOpenGL$ImageCache at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 9 more Could not run the sketch (Target VM failed to initialize). For more information, read revisions.txt and Help ? Troubleshooting.
Thanks for your help.