moving the OpenGL examples to the core

This commit is contained in:
benfry
2012-07-20 20:24:58 +00:00
parent b30328bb66
commit 40ecd562e3
133 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
void setup() {
size(255, 255, P3D);
// for (int x = 0; x < width; x++) {
// for (int y = 0; y < height; y++) {
// int c = color(x, y, 0);
// set(x, y, c);
// }
// }
loadPixels();
for (int i = 0; i < pixels.length; i++) {
int x = i % width;
int y = i / height;
int c = color(x, y, 0);
set(x, y, c);
}
updatePixels();
}
void draw() {
for (int x = 0; x < width; x++) {
for (int y = 0; y < height; y++) {
int c = get(x, y);
set(x, y, c);
}
}
println(frameRate);
}

View File

@@ -0,0 +1,16 @@
void setup() {
size(400, 400, P3D);
background(0);
}
void draw() {
for (int x = 0; x < width; x++) {
for (int y = 0; y < height; y++) {
int c = color(random(255), random(255), random(255));
set(x, y, c);
}
}
println(frameRate);
}

View File

@@ -0,0 +1,15 @@
void setup() {
size(400, 400, P3D);
background(0);
loadPixels();
}
void draw() {
for (int i = 0; i < pixels.length; i++) {
pixels[i] = color(random(255), random(255), random(255));
}
updatePixels();
println(frameRate);
}