We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOpenGL and 3D Libraries › pixel and vertex shaders - example
Page Index Toggle Pages: 1
pixel and vertex shaders - example (Read 1988 times)
pixel and vertex shaders - example
Sep 30th, 2007, 5:46pm
 
I am looking for code example of pixel and vertex shaders in processing. Anyone had publish a example?

I check and try some of this code, but I have compile problems:
http://processing.org/discourse/yabb_beta/YaBB.cgi?board=OpenGL;action=display;num=1159494801
http://processing.org/discourse/yabb_beta/YaBB.cgi?board=OpenGL;action=display;num=1159148336

thanks,

Mar
Re: pixel and vertex shaders - example
Reply #1 - Sep 30th, 2007, 7:05pm
 
What are the problems?
Re: pixel and vertex shaders - example
Reply #2 - Sep 30th, 2007, 7:49pm
 
I am trying with code with "CG" class from "AC" user (Reply #9 on: Oct 7th, 2006, 6:41am).Maybe I make something wrong but when I compile the code (I am using OSX and processing0125), and I check "libjogl_cg.jnilib" is inside openGL library folder:
Code:

java.lang.RuntimeException: java.lang.UnsatisfiedLinkError: /Applications/Processing 0125/libraries/opengl/library/libjogl_cg.jnilib:

at processing.opengl.PGraphicsOpenGL.requestDisplay(PGraphicsOpenGL.java:172)

at processing.core.PApplet.run(PApplet.java:1454)

at java.lang.Thread.run(Thread.java:613)
Caused by: java.lang.UnsatisfiedLinkError: /Applications/Processing 0125/libraries/opengl/library/libjogl_cg.jnilib:

at java.lang.ClassLoader$NativeLibrary.load(Native Method)

at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)

at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1676)

at java.lang.Runtime.loadLibrary0(Runtime.java:822)

at java.lang.System.loadLibrary(System.java:992)

at com.sun.opengl.impl.NativeLibLoader$DefaultAction.loadLibrary(NativeLibLoader.java:78)

java.lang.RuntimeException: java.lang.UnsatisfiedLinkError: /Applications/Processing 0125/libraries/opengl/library/libjogl_cg.jnilib:

at processing.opengl.PGraphicsOpenGL.requestDisplay(PGraphicsOpenGL.java:172)

at processing.core.PApplet.run(PApplet.java:1454)

at java.lang.Thread.run(Thread.java:613)
Caused by: java.lang.UnsatisfiedLinkError: /Applications/Processing 0125/libraries/opengl/library/libjogl_cg.jnilib:

at java.lang.ClassLoader$NativeLibrary.load(Native Method)

at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)

at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1676)

at java.lang.Runtime.loadLibrary0(Runtime.java:822)

at java.lang.System.loadLibrary(System.java:992)

at com.sun.opengl.impl.NativeLibLoader$DefaultAction.loadLibrary(NativeLibLoader.java:78)

at com.sun.opengl.impl.NativeLibLoader.loadLibrary(NativeLibLoader.java:101)

at com.sun.opengl.impl.NativeLibLoader.access$100(NativeLibLoader.java:47)

at com.sun.opengl.impl.NativeLibLoader$4.run(NativeLibLoader.java:151)

at java.security.AccessController.doPrivileged(Native Method)

at com.sun.opengl.impl.NativeLibLoader.loadCgImpl(NativeLibLoader.java:148)

at com.sun.opengl.cg.CgGL.<clinit>(CgGL.java:5412)

at Temporary_3396_3428$CG.<init>(Temporary_3396_3428.java:59)

at Temporary_3396_3428.setup(Temporary_3396_3428.java:9)

at processing.core.PApplet.handleDisplay(PApplet.java:1285)

at processing.opengl.PGraphicsOpenGL$1.display(PGraphicsOpenGL.java:226)

at com.sun.opengl.impl.GLDrawableHelper.display(GLDrawableHelper.java:78)

at javax.media.opengl.GLCanvas$DisplayAction.run(GLCanvas.java:281)

at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:194)

at javax.media.opengl.GLCanvas$DisplayOnEventDispatchThreadAction.run(GLCanvas.java:298)

at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)


at com.sun.opengl.impl.NativeLibLoader.loadLibrary(NativeLibLoader.java:101)

at com.sun.opengl.impl.NativeLibLoader.access$100(NativeLibLoader.java:47)

at com.sun.opengl.impl.NativeLibLoader$4.run(NativeLibLoader.java:151)

at java.security.AccessController.doPrivileged(Native Method)

at com.sun.opengl.impl.NativeLibLoader.loadCgImpl(NativeLibLoader.java:148)

at com.sun.opengl.cg.CgGL.<clinit>(CgGL.java:5412)

(I delete the last lines of error because the message was too long to post it)
Re: pixel and vertex shaders - example
Reply #3 - Jul 3rd, 2008, 4:36pm
 
I guess the error is caused due to creation of CgGL.cgCreateContext() ?
I have the same issue, if you found out the solution do let me know.
Thanks
Page Index Toggle Pages: 1