explanatory comments in cargo.toml

This commit is contained in:
MindSpunk 2018-12-14 23:11:49 +11:00 committed by Sébastien Crozet
parent 112b9e845c
commit 8af8d6b202
1 changed files with 10 additions and 0 deletions

View File

@ -14,17 +14,27 @@ license = "BSD-3-Clause"
[features]
## Default to produce opengl compatible matrices and conventions
default = ["opengl_projection"]
## Produce projection matrices and default to coordinate space behaviour that is compatible with OpenGL's NDC space
opengl_projection = ["right_hand_default", "negone_to_one_clip_default"]
## Produce projection matrices and default to coordinate space behaviour that is compatible with Vulkan's NDC space
vulkan_projection = ["right_hand_default", "zero_to_one_clip_default", "projection_y_flip"]
## Produce projection matrices and default to coordinate space behaviour that is compatible with DirectX's NDC space
directx_projection = ["left_hand_default", "zero_to_one_clip_default"]
## Applies an implicit `mat[(1,1)] *= -1` to all projection matrices. Essentially flips the output of using the matrix
## about the x axis (vertical flip)
projection_y_flip = []
## Whether to default to left hand (DirectX) or right hand (OpenGL/Vulkan) coordinate system behaviour
left_hand_default = []
right_hand_default = []
## Whether to default to 0 to 1 depth range (DirectX, Vulkan, Metal) or -1 to 1 (OpenGL) behaviour
zero_to_one_clip_default = []
negone_to_one_clip_default = []