0,0 is on:
X11,godot: top-left
OpenGL: bottom-left
Unity: center


X11*. You draw the screen top to bottom, so top-left is more native.

@iska That's a hardware implementation detail that shouldn't surface itself to software APIs.

@iska As most programmers have taken basic maths/algebra, there is an implicit expectation that screen positions exist in the upper right quadrant of a two-axis graph.

Using a "top-down" positioning style (absolute values of < 0 on Y axis) is not intuitive at all. Software should be abstracting hardware implementations to APIs that make sense.

What is the point of this "abstraction"? You're still not centered but now it's inconsistent with reality or most other standards.
It's not even an abstraction, as it doesn't reduce detail. Shuffling your deck isn't abstraction either.

Tell me ONE display, chip or protocol that DOESN'T draw top-left to bottom-right.
I expect 0,0 to be where the GPU starts drawing, like 0x0..0 is where the CPU starts executing...

@iska again, software should be abstracting that hardware detail into a positioning scheme that makes sense. Like OpenGL does. ;)

@iska @eriner bitmaps have origin at bottom left but i think most tvs and displays scan originating from top left

@wowaname @eriner

most displays scan from top-left

Might also be connected to text, that also starts from top-left. (possibly ascii art?)

@iska @eriner
>Might also be connected to text
i'll urge you to read up on display technologies and protocols before thinking out loud and looking clueless in the process.
@iska In Vulkan the origin is in the top left of the screen, with Y pointing downwards, so I guess the successor to OpenGL got it right this time.
Now if only there were fast freedom respecting GPU's that could do Vulkan...

oh thank god. This is one thing Vulkan got right.
Thank you Khronos 🙏

@iska @Suiseiseki i seem to recall opengl does put 0,0 at the middle of the screen in device coordinates. there's typically a projection matrix involved that alters the coordinate system though so the only part that matters is if Y is up or Y is down.
@iska @Suiseiseki nope, its -1,1 in clip space which the viewport transforms to 0,1.

as for top left vs bottom left, it's an old hardware thing. microsoft and apple pushed top left because it was more reasonable to desktop programmers who drew top down whereas the graphics kits used to actually be bottom left.

0,0 being the center is useful for some weird cases though; namely, being able to anchor visual elements to the screen center. games have to do this very often, most applications don't.
@Suiseiseki @iska are there fast freedom rrspecting gpus that can opengl?
@meeper Actually yes.
Intel integrated prior to gen9 apparently operates just fine without requiring any proprietary firmware, but sadly all the newer gens only come inside processors that don't operate without proprietary software.
The integrated graphics in gm45 in librebooted thinkpads are actually quite fast when you think about how demanding rendering is and it does indeed play supertux2 without much slowdown.
Surprisingly, the fastest freedom respecting GPU's you can currently get are certain very old nvidia(!) cards that Nouveau has reclocking for.
Sign in to participate in the conversation

Starnix is a community effort lead by FOSS enthusiasts for the purpose of establishing ActivityPub Software and promoting Fediverse usage. The primary topics for this Mastodon instance include but are not limited to software technology, including FOSS, Unix and Unix-like operating systems, and gaming.