summaryrefslogtreecommitdiff
path: root/include/cglm/vec4-ext.h
diff options
context:
space:
mode:
authorAaditya Dhruv <[email protected]>2026-01-31 17:17:25 -0600
committerAaditya Dhruv <[email protected]>2026-01-31 17:17:25 -0600
commitb20a6103cb202c1721aa2d300b1e7bdafef3366d (patch)
treebdf75ec1a9ac33a23f38b8bddf997f83873b7f53 /include/cglm/vec4-ext.h
parent42401e4e1c34f9ddc7246550227281ec6aeeceac (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/vec4-ext.h')
0 files changed, 0 insertions, 0 deletions