File tree Expand file tree Collapse file tree
java/examples/Demos/Graphics/LowLevelGL Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22import java.nio.* ;
33
44PGL pgl;
5- PShader flatShader ;
5+ PShader sh ;
66
77int vertLoc;
88int colorLoc;
@@ -18,7 +18,7 @@ void setup() {
1818
1919 // Loads a shader to render geometry w/out
2020 // textures and lights.
21- flatShader = loadShader(" frag.glsl" , " vert.glsl" );
21+ sh = loadShader(" frag.glsl" , " vert.glsl" );
2222
2323 vertices = new float [12 ];
2424 vertData = allocateDirectFloatBuffer(12 );
@@ -37,10 +37,10 @@ void draw() {
3737 updateGeometry();
3838
3939 pgl = beginPGL();
40- flatShader . bind();
40+ sh . bind();
4141
42- vertLoc = pgl. getAttribLocation(flatShader . glProgram, " vertex" );
43- colorLoc = pgl. getAttribLocation(flatShader . glProgram, " color" );
42+ vertLoc = pgl. getAttribLocation(sh . glProgram, " vertex" );
43+ colorLoc = pgl. getAttribLocation(sh . glProgram, " color" );
4444
4545 pgl. enableVertexAttribArray(vertLoc);
4646 pgl. enableVertexAttribArray(colorLoc);
@@ -53,7 +53,7 @@ void draw() {
5353 pgl. disableVertexAttribArray(vertLoc);
5454 pgl. disableVertexAttribArray(colorLoc);
5555
56- flatShader . unbind();
56+ sh . unbind();
5757
5858 endPGL();
5959}
Original file line number Diff line number Diff line change 1818 Boston, MA 02111-1307 USA
1919 */
2020
21- #define PROCESSING_COLOR_SHADER
22-
2321uniform mat4 transform;
2422
2523attribute vec4 vertex;
You can’t perform that action at this time.
0 commit comments