16 ms·
It would always be possible to project a 3D world onto a 2D plane in any 2D graphics API, which is exactly what the projection matrix does in OpenGL.
by skolemtotem 8y ago
It would always be possible to project a 3D world onto a 2D plane in any 2D graphics API, which is exactly what the projection matrix does in OpenGL.
- Animats 8y agoThe projection matrix transforms the 3D world into a 3D world in screen space. Two of the dimensions are the screen coordinates, and the third is depth into the screen. The depth is used for Z-buffering (hiding the stuff in back), and for fog and focus effects.
- seandougall 8y agoDepth in OpenGL is a separate 2D buffer. You can use it to approximate the effects of 3D space, but it’s still fundamentally a set of 2D operations. Of course, it’s all fundamentally just bits on a heap, so past a certain point the argument becomes academic.
- skolemtotem 8y agoThat, I sort-of agree with. Layering isn't unique to 3D, so it's debatable whether the incorporation of a depth buffer makes OpenGL a 3D API.
- Animats 8y agoIt's not layering. It's depth. The depth buffer will work for cases where two objects cross in Z. Unlike the painter's algorithm.