mirror of
https://github.com/processing/processing4.git
synced 2026-06-08 08:31:28 +02:00
latest of simon's lighting changes
This commit is contained in:
@@ -6327,6 +6327,12 @@ v PApplet.this.stop();
|
||||
}
|
||||
|
||||
|
||||
public void ambientLight(float red, float green, float blue, float x, float y, float z) {
|
||||
if (recorder != null) recorder.ambientLight(red, green, blue, x, y, z);
|
||||
g.ambientLight(red, green, blue, x, y, z);
|
||||
}
|
||||
|
||||
|
||||
public void directionalLight(float red, float green, float blue,
|
||||
float nx, float ny, float nz) {
|
||||
if (recorder != null) recorder.directionalLight(red, green, blue, nx, ny, nz);
|
||||
|
||||
+15
-1
@@ -355,7 +355,10 @@ public interface PConstants {
|
||||
static final int EG = 33;
|
||||
static final int EB = 34;
|
||||
|
||||
static final int VERTEX_FIELD_COUNT = 35;
|
||||
//has this vertex been lit yet
|
||||
static final int BEEN_LIT = 35;
|
||||
|
||||
static final int VERTEX_FIELD_COUNT = 36;
|
||||
|
||||
// line & triangle fields (note how these overlap)
|
||||
|
||||
@@ -369,6 +372,17 @@ public interface PConstants {
|
||||
|
||||
static final int LINE_FIELD_COUNT = 5;
|
||||
static final int TRIANGLE_FIELD_COUNT = 5;
|
||||
|
||||
static final int TRI_DIFFUSE_R = 0;
|
||||
static final int TRI_DIFFUSE_G = 1;
|
||||
static final int TRI_DIFFUSE_B = 2;
|
||||
static final int TRI_DIFFUSE_A = 3;
|
||||
static final int TRI_SPECULAR_R = 4;
|
||||
static final int TRI_SPECULAR_G = 5;
|
||||
static final int TRI_SPECULAR_B = 6;
|
||||
static final int TRI_SPECULAR_A = 7;
|
||||
|
||||
static final int TRIANGLE_COLOR_COUNT = 8;
|
||||
|
||||
// normal modes for lighting
|
||||
static final int AUTO_NORMAL = 0; // normal calculated per triangle
|
||||
|
||||
@@ -2546,6 +2546,10 @@ public class PGraphics extends PImage implements PConstants {
|
||||
public void ambientLight(float red, float green, float blue) {
|
||||
depthError("ambientLight");
|
||||
}
|
||||
|
||||
public void ambientLight(float red, float green, float blue, float x, float y, float z) {
|
||||
depthError("ambientLight");
|
||||
}
|
||||
|
||||
public void directionalLight(float red, float green, float blue,
|
||||
float nx, float ny, float nz) {
|
||||
|
||||
+803
-436
File diff suppressed because it is too large
Load Diff
@@ -137,6 +137,9 @@ saturday late afternoon
|
||||
X fix bug with openStream() and upper/lowercase stuff
|
||||
X do a better job of handling any kind of URLs in openStream()
|
||||
|
||||
sunday morning
|
||||
X incorporate simon's new lighting code
|
||||
|
||||
|
||||
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
||||
|
||||
|
||||
Reference in New Issue
Block a user