Removing the group of OpenGL examples

This commit is contained in:
Casey Reas
2012-08-31 21:53:02 +00:00
parent c92a89d93c
commit 07750c4811
145 changed files with 8 additions and 23317 deletions
@@ -1,9 +1,7 @@
// Draws a triangle using low-level OpenGL calls.
import java.nio.*;
PGraphicsOpenGL pg;
PGL pgl;
PShader flatShader;
int vertLoc;
@@ -18,8 +16,6 @@ FloatBuffer colorData;
void setup() {
size(640, 360, P3D);
pg = (PGraphicsOpenGL)g;
// Loads a shader to render geometry w/out
// textures and lights.
flatShader = loadShader("frag.glsl", "vert.glsl");
@@ -36,11 +32,11 @@ void draw() {
// The geometric transformations will be automatically passed
// to the shader.
rotate(frameCount * 0.01f, width, height, 0);
rotate(frameCount * 0.01, width, height, 0);
updateGeometry();
pgl = pg.beginPGL();
pgl = beginPGL();
flatShader.bind();
vertLoc = pgl.getAttribLocation(flatShader.glProgram, "inVertex");
@@ -58,7 +54,8 @@ void draw() {
pgl.disableVertexAttribArray(colorLoc);
flatShader.unbind();
pg.endPGL();
endPGL();
}
void updateGeometry() {