-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
Original author: bearmoun...@gmail.com (September 12, 2012 17:01:00)
- ortho() works fine
- ortho(0, width, 0, height) seem to be be misaligned
- ortho(0, width, 0, height, -10, 10) don't seem to show anything
For any practical use of ortho(...) function you must now be followed up with a call to translate(...) with specific coordinates which depend on the left, right, top, and bottom parameters for the ortho call as well as width and height of your window. This is unpractical.
Reproduce:
void setup() {
size(800, 600, OPENGL);
}
void draw() {
float x0 = 124213;
float x1 = x0 + 512;
float y0 = 2342;
float y1 = y0 + 384;
float tx = width/2 + x0;
float ty = height/2 - y1;
ortho(x0, x1, y0, y1);
translate(tx, ty);
background(0x234567);
rect(0, 0, 10, 10);
line(0, 0, width, height);
rect(x1-x0, y1-y0, -10, -10);
}
Version 2.0b3 Mac OSX Mountain Lion 10.8.1
note: I have yet to figure out how to get ortho(left,right,bottom,top,far,near) to display anything.
Original issue: http://code.google.com/p/processing/issues/detail?id=1240