Smooth shading in openGL
in
Core Library Questions
•
1 year ago
Hey,
how would I go about a 3d model in my scene that I want to have rendered smoothly? Are there native ways to get something like a phong shader going? I tried to use 3rd party libraries like surfaceLib and GLGraphics for this, but both dont seem to work with Processing 2.04a :(
Cheers
edit: I get this error when trying to work with GLGraphics:
Exception in thread "Animation Thread" java.lang.NoClassDefFoundError: processing/opengl/PGraphicsOpenGL$ImageCache
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2404)
at java.lang.Class.getConstructor0(Class.java:2714)
at java.lang.Class.getConstructor(Class.java:1674)
at processing.core.PApplet.makeGraphics(Unknown Source)
at processing.core.PApplet.size(Unknown Source)
at processing.core.PApplet.size(Unknown Source)
at sketch_dec06a.setup(sketch_dec06a.java:58)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ClassNotFoundException: processing.opengl.PGraphicsOpenGL$ImageCache
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 11 more
how would I go about a 3d model in my scene that I want to have rendered smoothly? Are there native ways to get something like a phong shader going? I tried to use 3rd party libraries like surfaceLib and GLGraphics for this, but both dont seem to work with Processing 2.04a :(
Cheers
edit: I get this error when trying to work with GLGraphics:
Exception in thread "Animation Thread" java.lang.NoClassDefFoundError: processing/opengl/PGraphicsOpenGL$ImageCache
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2404)
at java.lang.Class.getConstructor0(Class.java:2714)
at java.lang.Class.getConstructor(Class.java:1674)
at processing.core.PApplet.makeGraphics(Unknown Source)
at processing.core.PApplet.size(Unknown Source)
at processing.core.PApplet.size(Unknown Source)
at sketch_dec06a.setup(sketch_dec06a.java:58)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ClassNotFoundException: processing.opengl.PGraphicsOpenGL$ImageCache
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 11 more
1