cansik / processing-postfx

A shader based postFX library for processing.
148 stars 13 forks source link

Shader path method not working on Windows #25

Closed cansik closed 7 years ago

cansik commented 7 years ago

As mentioned by first in the processing forum (Thread: PostFX library not working), there is a problem with the shader path parsing on Windows.

Here is the full error message:

Could not parse -1 for --display
java.lang.reflect.InvocationTargetException
  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
  at ch.bildspur.postfx.builder.PostFXBuilder.getPass(PostFXBuilder.java:38)
  at ch.bildspur.postfx.builder.PostFXBuilder.brightPass(PostFXBuilder.java:122)
  at OffScreenEffect.draw(OffScreenEffect.java:65)
  at processing.core.PApplet.handleDraw(PApplet.java:2439)
  at processing.opengl.PSurfaceJOGL$DrawListener.display(PSurfaceJOGL.java:849)
  at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:692)
  at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:674)
  at jogamp.opengl.GLAutoDrawableBase$2.run(GLAutoDrawableBase.java:443)
  at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1293)
  at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
  at com.jogamp.newt.opengl.GLWindow.display(GLWindow.java:759)
  at com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:81)
  at com.jogamp.opengl.util.AnimatorBase.display(AnimatorBase.java:452)
  at com.jogamp.opengl.util.FPSAnimator$MainTask.run(FPSAnimator.java:178)
  at java.util.TimerThread.mainLoop(Timer.java:555)
  at java.util.TimerThread.run(Timer.java:505)
Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/Users/Sandro%20Castronari/Documents/Processing/libraries/PostFX/library/PostFX.jar
  at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
  at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
  at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
  at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
  at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
  at java.nio.file.Paths.get(Paths.java:84)
  at ch.bildspur.postfx.pass.BasePass.getLibPath(BasePass.java:54)
  at ch.bildspur.postfx.pass.BasePass.<init>(BasePass.java:21)
  at ch.bildspur.postfx.pass.BrightPass.<init>(BrightPass.java:19)
  at ch.bildspur.postfx.pass.BrightPass.<init>(BrightPass.java:15)
  ... 20 more
cansik commented 7 years ago

I've added a fix for the path, but can not test it. Would be nice if somebody could test it on a windows machine:

PostFX_windowsfix.zip

cansik commented 7 years ago

@kfrajer has tested the framework on windows:

AdvancedEffect....good
ReadMeRendering....good (Impressive)
CustomShaderEffect...good
OffScreenEfects....good