Coordinate translation

Lee's icon

Hi, the default coords for drawing in Jitter are -0.5 to 0.5. Is there anyway I can change this so that I can have 0,0 top left corner and e.g., 320,200 bottom right corner and all drawing adjusts itself? I've tried using glortho but this doesn't seem to do the trick...

thx

Lee's icon

Hi. Anyone any input?

Roman Thilenius's icon

... scaling the input range is not sufficient?

Vincent Goudard's icon

Not very clear from your message, but it seems you are talking about OpenGL drawing which happens in a coord system ruled by camera position, look-at, lens_angle.
In short, the default settings will give you a y-range from -/+ 0,82842712474619 (corresponding to the 45° lens_angle) and x-range equals y-range multiplied by your jit.window screen ratio.

A good way to translate you GL coord system to screen coord system in to use worldtoscreen function of the jit.gl.render.