Replaced OPENGL constant with P3D and removed processing.opengl import from examples

This commit is contained in:
codeanticode
2011-07-20 06:06:36 +00:00
parent 6d0bb2dfe1
commit d165503d99
18 changed files with 18 additions and 58 deletions
@@ -3,15 +3,13 @@
// available in OPENGL2.
// Images by Kevin Bjorke.
import processing.opengl.*;
PImage pic1, pic2;
int selMode = REPLACE;
String name = "replace";
int picAlpha = 255;
void setup() {
size(800, 480, OPENGL);
size(800, 480, P3D);
PFont font = createFont(PFont.list()[0], 20);
textFont(font, 20);
@@ -2,12 +2,10 @@
// Simple example showing a lit rotating cube. The projection
// is set to orthographic if the mouse is pressed.
import processing.opengl.*;
float spin = 0.0;
void setup() {
size(400, 400, OPENGL);
size(400, 400, P3D);
noStroke();
}
@@ -4,13 +4,11 @@
// be later organized in a tree structure to apply geometrical
// transformations to different levels of the tree.
import processing.opengl.*;
PShape3D object;
PShape group1, group2, group3;
void setup() {
size(600, 600, OPENGL);
size(600, 600, P3D);
noStroke();
// We record all the geometry in object.
@@ -10,8 +10,6 @@
// Click on the screen to enable/disable drawing with the recorded
// shape.
import processing.opengl.*;
PShape globe;
PImage texmap;
@@ -29,7 +27,7 @@ int SINCOS_LENGTH = (int)(360.0f / SINCOS_PRECISION);
boolean usingPShape = false;
public void setup() {
size(600, 600, OPENGL);
size(600, 600, P3D);
PFont font = createFont(PFont.list()[0], 12);
textFont(font, 12);
@@ -7,8 +7,6 @@
// using the object-oriented mode, where the drawing calls are methods
// in the PShape3D object.
import processing.opengl.*;
PShape3D globe;
PImage texmap;
@@ -26,7 +24,7 @@ int SINCOS_LENGTH = (int)(360.0f / SINCOS_PRECISION);
boolean usingPShape = false;
public void setup() {
size(600, 600, OPENGL);
size(600, 600, P3D);
PFont font = createFont(PFont.list()[0], 12);
textFont(font, 12);
@@ -5,8 +5,6 @@
* Distribucion aleatoria uniforme sobre la superficie de una esfera.
*/
import processing.opengl.*;
int cuantos = 8000;
pelo[] lista ;
float[] z = new float[cuantos];
@@ -17,7 +15,7 @@ float rx = 0;
float ry =0;
void setup() {
size(1024, 768, OPENGL);
size(1024, 768, P3D);
radio = height/3.5;
lista = new pelo[cuantos];
@@ -5,9 +5,6 @@
* around the center.
*/
import processing.opengl.*;
PImage a;
boolean onetime = true;
int[][] aPixels;
@@ -15,7 +12,7 @@ int[][] values;
float angle;
void setup() {
size(1024, 768, OPENGL);
size(1024, 768, P3D);
aPixels = new int[width][height];
values = new int[width][height];
@@ -6,9 +6,6 @@
* rotating arcs on the screen.
*/
import processing.opengl.*;
// Trig lookup tables borrowed from Toxi; cryptic but effective.
float sinLUT[];
float cosLUT[];
@@ -23,7 +20,7 @@ int style[];
void setup() {
size(1024, 768, OPENGL);
size(1024, 768, P3D);
background(255);
// Fill the tables
@@ -2,8 +2,6 @@
//
// Using push() and pop() to define the curves of the lines of type.
import processing.opengl.*;
Line ln;
Line lns[];
@@ -14,7 +12,7 @@ String words[] = {
};
void setup() {
size(800, 480, OPENGL);
size(800, 480, P3D);
// Array of line objects
lns = new Line[8];
@@ -5,12 +5,9 @@
* Display a box with three different kinds of lights.
*/
import processing.opengl.*;
void setup()
{
size(1024, 768, OPENGL);
size(1024, 768, P3D);
noStroke();
}
+1 -4
View File
@@ -4,8 +4,6 @@
// Ported from NeHe tutorial 8:
// http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=08
import processing.opengl.*;
import javax.media.opengl.*;
import java.nio.*;
import javax.media.opengl.glu.gl2.GLUgl2;
@@ -52,8 +50,7 @@ float ySpeed = 0.2f;
GLUgl2 glu;
void setup() {
size(400, 400, OPENGL);
// orientation(PORTRAIT);
size(400, 400, P3D);
glu = new GLUgl2();
@@ -6,8 +6,6 @@
// Sun and mercury textures from http://planetpixelemporium.com
// Star field picture from http://www.galacticimages.com/
import processing.opengl.*;
PImage starfield;
PShape sun;
@@ -21,7 +19,7 @@ PShape planet2;
PImage surftex2;
void setup() {
size(800, 480, OPENGL);
size(800, 480, P3D);
starfield = loadImage("starfield.jpg");
suntex = loadImage("sun.jpg");
@@ -4,8 +4,6 @@
// from a file in PDB format (http://www.pdb.org/) and displays
// the structure using a ribbon representation.
import processing.opengl.*;
String pdbFile = "4HHB.pdb"; // PDB file to read
//String pdbFile = "2POR.pdb";
//String pdbFile = "1CBS.pdb";
@@ -24,7 +22,7 @@ ArrayList models;
Arcball arcball;
void setup() {
size(800, 600, OPENGL);
size(800, 600, P3D);
arcball = new Arcball(width/2, height/2, 600);
readPDB(pdbFile);
@@ -3,8 +3,6 @@
// the PShape3D class to create a particle system.
// Rocket model from http://keleb.free.fr/codecorner/models-en.htm
import processing.opengl.*;
PShape3D rocket;
PShape3D particles;
int[] lifetimes;
@@ -19,8 +17,7 @@ float timeInc = 0.03;
PVector axis, pos, vel;
void setup() {
size(800, 600, OPENGL);
//orientation(PORTRAIT);
size(800, 600, P3D);
rocket = (PShape3D)loadShape("rocket.obj");
// Adjusting the size, orientation and position of the object.
@@ -9,8 +9,6 @@
* and right to zoom.
*/
import processing.opengl.*;
// Used for oveall rotation
float ang;
@@ -21,7 +19,7 @@ int limit = 500;
Cube[]cubes = new Cube[limit];
void setup() {
size(1024, 768, OPENGL);
size(1024, 768, P3D);
background(0);
noStroke();
@@ -8,8 +8,6 @@
* Use an "arc ball" to deal with this appropriately.
*/
import processing.opengl.*;
PImage bg;
PImage texmap;
@@ -29,7 +27,7 @@ int SINCOS_LENGTH = int(360.0 / SINCOS_PRECISION);
void setup() {
size(1024, 768, OPENGL);
size(1024, 768, P3D);
texmap = loadImage("world32k.jpg");
initializeSphere(sDetail);
}
@@ -6,15 +6,13 @@
// the same surface but without the texture, and the
// offscreen texture with the particle system.
import processing.opengl.*;
PGraphics pg;
PShape trefoil;
PShape3D particles;
int mode = 0;
void setup() {
size(280, 400, OPENGL);
size(280, 400, P3D);
PFont font = createFont(PFont.list()[0], 18);
textFont(font, 18);
@@ -13,7 +13,6 @@
*/
import processing.opengl.*;
import java.awt.Polygon;
Gesture gestureArray[];
@@ -27,7 +26,7 @@ int tmpYp[];
void setup() {
size(1024, 768, OPENGL);
size(1024, 768, P3D);
background(0, 0, 0);
noStroke();