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
Hey guys,
I have my little openGL sketch where I can rotate around a 3d model. I am not using PeasyCam, cause I think it has some weird movement in it and I also had problems to position it correcty, so I use translate and rotate to move in the 3d scene.
However, I'd like to reset my camera to the intial view when hitting the spacebar. How would I do this (not the keyboard thing, just the camera)?
Cheers
Well the title says it all. I have a simple openGL sketch with a 3d model where I can rotate and pan the view. When I do so, the text that I have written in the lower left of my screen changes its color, like as it is effected by the lights in the 3d scene.
I only used:
lights();
How do I make my text keep its color/brightness?
Cheers
Hi there,
I am displaying some 3D models in a openGL sketch. Now I just want to show the number of vertices and faces as plain text in the window. When I use:
text("vertices: "+ numVerts, 0, 0);
it does show up, but it looks ugly (compressed badly) when near and also it is placed inside the 3d scene, which is not what I want. I want it to be simple 2d text in the lower left corner of my sketch, and stay there put no matter what the 3d scene is rotated or what not.
Unfortunately this seems to be outdated, because the folder and file names and structure is different now. I can not locate the files or folders described in the tutorial, so I cannot fix my problem.
Can someone please help me on how to use openGL on a 64bit system?
Cheers