diff options
| author | Aaditya Dhruv <[email protected]> | 2026-01-31 17:17:25 -0600 |
|---|---|---|
| committer | Aaditya Dhruv <[email protected]> | 2026-01-31 17:17:25 -0600 |
| commit | b20a6103cb202c1721aa2d300b1e7bdafef3366d (patch) | |
| tree | bdf75ec1a9ac33a23f38b8bddf997f83873b7f53 /include/cglm/call/clipspace/project_no.h | |
| parent | 42401e4e1c34f9ddc7246550227281ec6aeeceac (diff) | |
Fix OpenGL vs local axis issue
- World coordinates is positive x to the left, positive y inwards,
positive z upwards
All math before sending data to OpenGL happens in these world
coordinates. For example, curr_chunk is in world coordinates. chunk
coordinates are also in world system. Only when we get/set data to
OpenGL functions do we perform the 2 step translation
- world y is negated and
- then flipped with world z
so { x, y, z } --> { x, z, -y } basically.
These translations are done for example when in the chunk->model
translation, converting camera coordinates (that are in opengl coords)
to world coords for curr_chunk data, and setting vertex positions in
chunk_load. These have been marked with "//OpenGL FLIP" so it's easy to
find
Diffstat (limited to 'include/cglm/call/clipspace/project_no.h')
0 files changed, 0 insertions, 0 deletions
