don't know why a ClassNotFoundException: com.sun.opengl.cg.CGcontext error is being thrown
in
Contributed Library Questions
•
1 years ago
here's the error:
- Exception in thread "Animation Thread" java.lang.NoClassDefFoundError: com/sun/opengl/cg/CGcontext
- at codeanticode.glgraphics.GLSLShader.<init>(Unknown Source)
- at Atomos3.setup(Atomos3.java:116)
- at processing.core.PApplet.handleDraw(PApplet.java:1866)
- at processing.core.PApplet.run(PApplet.java:1788)
- at java.lang.Thread.run(Thread.java:680)
- Caused by: java.lang.ClassNotFoundException: com.sun.opengl.cg.CGcontext
- at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
- at java.security.AccessController.doPrivileged(Native Method)
- at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
- at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
- at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
- at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
- ... 5 more
heres the important code:
- import processing.opengl.*;
- import javax.media.opengl.*;
- import codeanticode.glgraphics.*;
- GLSLShader shader;
- //public String sketchRenderer() {
- // return P3D;
- //}
- void setup() {
- size(960, 600, P3D);
- sphereDetail(12);
- shader = new GLSLShader(this);
- shader.loadVertexShader("toonvert.glsl");
- shader.loadFragmentShader("toonfrag.glsl");
- }
- void draw() {
- background(0);
- directionalLight(0, 50, 200, 0, 0, 100);
- directionalLight(200, 0, 25, 0, 0, -100);
- GLGraphics renderer = (GLGraphics)g;
- renderer.beginGL();
- lights();
- shader.start();
- translate(width/2, height/2, 0);
- sphere(100);
- shader.stop(); // Disabling shader.
- renderer.endGL();
- }
anyone have an idea as to why this code would throw that error?
1