Before I file a bug about this I just want to make sure I'm using it right.
Here's a simple sketch:
Code:
import processing.opengl.*;
void setup()
{
size(400, 300, OPENGL);
}
void draw()
{
background(0);
pointLight(255, 255, 255, 0, 0, 0);
perspective(PI/1.5, width/height, 1, 1000);
camera(0, 0, 0, 0, 0, 1, 0, -1, 0);
stroke(0);
fill(255, 0, 0);
box(10);
hint(DISABLE_DEPTH_TEST);
fill(255);
rect(0, 0, 20, 20);
}
I run it and it looks like the inside of a room, that's fine. The place where I expect the rectangle to appear is the upper left hand corner, as if I was drawing in 2D or with no camera transforms. When I run this I don't see any rectangle. When I change the drawing mode to P3D I get a black screen. Is this a bug or am I just doing things out of order?
skanaar: That method seems like a good one, except that I want to use OPENGL and loading pixels is a slow operation in that mode.