To fix things for 2.0 follow these steps...
1. Change your vertex shader to this:
1. Change your vertex shader to this:
- uniform mat4 projmodelviewMatrix;
- attribute vec4 inVertex;
- varying vec2 surfacePos;
- void main() {
- surfacePos = inVertex.xy;
- gl_Position = projmodelviewMatrix * inVertex;
- }
- // peasycam + 2.0 crashes my sketch so I had to remove it
- import toxi.geom.Vec3D;
- PShader shader;
- PShape torus;
- void setup() {
- size(800, 600, P3D);
- shader = loadShader("check.fs", "check.vs");
- torus = createTorus( 40, 40, 40, 40, 40, 40);
- }
- void draw() {
- background(50);
- translate(width/2, height/2);
- rotateX(radians(90));
- rotateZ(frameCount*0.01);
- scale(2);
- shader(shader);
- shape(torus);
- }
- tor.noStroke();