GLSL and while
in
Integration and Hardware
•
2 months ago
Hey I just started playing arround with the shader and have a strange issue. The code fragment that causes the trouble is here:
- void main() {
- vec2 vUv = glitchOfs+vec2(vertTexCoord.s,vertTexCoord.t);
- while (vUv.x > 1.0) vUv.x -= 1.0;
- ...
This code works fine on my mac book air (2012 model) using processing v2.0.1. I tried to run this code on my win64 machine (NVIDI NVS 3100M) using processing v2.0.1 and it fails with the error message:
- java.lang.RuntimeException: java.lang.RuntimeException: Cannot link shader program:"
(stacktrace at the end of this post). when I change the while (vUv..) into a if (vUv...) it works (at least it doesn't crash). As the error is thrown by the JOGL framework I think its a) a driver issue or b) a jogl issue.
does anyone have a clue what causes this error?
Stacktrace:
- java.lang.RuntimeException: java.lang.RuntimeException: Cannot link shader program:
- Unknow error
- at com.jogamp.common.util.awt.AWTEDTExecutor.invoke(AWTEDTExecutor.java:58)
- at jogamp.opengl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:100)
- at jogamp.opengl.ThreadingImpl.invokeOnOpenGLThread(ThreadingImpl.java:205)
- at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:172)
- at javax.media.opengl.Threading.invoke(Threading.java:191)
- at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:483)
- at processing.opengl.PGL.requestDraw(PGL.java:1155)
- at processing.opengl.PGraphicsOpenGL.requestDraw(PGraphicsOpenGL.java:1602)
- at processing.core.PApplet.run(PApplet.java:2141)
- at java.lang.Thread.run(Thread.java:662)
- Caused by: java.lang.RuntimeException: Cannot link shader program:
- Unknow error
- at processing.core.PGraphics.showException(PGraphics.java:7815)
- at processing.opengl.PShader.init(PShader.java:741)
- at processing.opengl.PShader.getUniformLoc(PShader.java:406)
- at processing.opengl.PShader.setUniformImpl(PShader.java:537)
- at processing.opengl.PShader.set(PShader.java:277)
- at triangles.setup(triangles.java:60)
- at processing.core.PApplet.handleDraw(PApplet.java:2245)
- at processing.opengl.PGL$PGLListener.display(PGL.java:2643)
- at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:576)
- at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:561)
- at javax.media.opengl.awt.GLCanvas$7.run(GLCanvas.java:1054)
- at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1024)
- at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:899)
- at javax.media.opengl.awt.GLCanvas$8.run(GLCanvas.java:1065)
- at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
- at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:666)
- at java.awt.EventQueue.access$400(EventQueue.java:81)
- at java.awt.EventQueue$2.run(EventQueue.java:627)
- at java.awt.EventQueue$2.run(EventQueue.java:625)
- at java.security.AccessController.doPrivileged(Native Method)
- at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
- at java.awt.EventQueue.dispatchEvent(EventQueue.java:636)
- at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
- at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
- at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
- at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
- at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
- at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
1