Page 1 of 1

graphics.points coordinates are borked(?)

Posted: Wed Sep 13, 2017 10:07 am
by weakman54
So, I was gonna faff about with transformations to get a better grasp of how they worked, when I noticed something interesting:
wtfpoints.PNG
wtfpoints.PNG (6.84 KiB) Viewed 2415 times
Hmm, lets zoom in:
wtfpointsZoom.PNG
wtfpointsZoom.PNG (1.51 KiB) Viewed 2415 times
Ok, what? So calling points as (1, 1) will place the point one pixel above the rectangle, which has the starting point (1, 1)?
So did I find a bug, or is this intended?

If it's intended, why is it like this?

Re: graphics.points coordinates are borked(?)

Posted: Wed Sep 13, 2017 10:16 am
by bartbes
So first of all, the top-left is actually (0, 0), not (1, 1). The second thing you may be seeing, and this depends on drivers, is that points are usually drawn with the coordinate as its centre point. This means that (at least on most systems) drawing at (0.5,0.5) is the way to fill the pixel at (0, 0), and drawing at (0,0) actually fills all neighbouring pixels. Unfortunately points are just really awkwardly defined in OpenGL.

Re: graphics.points coordinates are borked(?)

Posted: Wed Sep 13, 2017 11:33 am
by weakman54
Ah, that makes sense (and kind of not as well...)

This should probably be stated somewhere on the wiki pages for points and point =/
Edit: nevermind, it is there... However it might be higlighted a bit more?