We are about to switch to a new forum software. Until then we have removed the registration on this forum.
in this case, let's assume creating two different loops (one for 2D casting, one for 3D) is not an easy task.
Does this going in out depth test can lead to some issues in frame rate, gpu processing, etc? Same question, regarding the camera matrix transformation in a loop.
Thanks!
`String [] texts = { "why", "is", "this", "?"};
PMatrix original; PMatrix camera;
void setup() {
size( 500, 500, P3D);
original = getMatrix((PMatrix3D)null);
}
void draw() { background(200);
camera( 50, -50, 50, 0, 0, 0, 0, 1, 0 ); camera = getMatrix((PMatrix3D)null);
for(int i = 0; i < 4; i++){
//resetMatrix();
//applyMatrix(original);
//above is same as:
camera();
hint(DISABLE_DEPTH_TEST);
fill(0);
text( texts[i], 40 * i + 20, 20);
hint(ENABLE_DEPTH_TEST);
resetMatrix();
applyMatrix(camera);
fill(-1);
pushMatrix();
translate(-15 + i*15,0,0);
box(10);
popMatrix();
}
}`