mirror of
https://github.com/recp/cglm.git
synced 2026-02-17 03:39:05 +00:00
Add function glm_perspective_lh_zo
This commit adds the function `glm_perspective_lh_zo`, modelled on the implementation of glm_perspective, but amended to provide a left-hand coordinate system expected by DirectX, Metal and Vulkan (per the GLM project's `glm/detail/setup.hpp`). It uses a clip-space of zero-to-one. The function is tested against a longhand version of the algorithm it seeks to implement as well as against the output of the GLM project's `glm::perspectiveLH_ZO` function. This commit adds a new subdirectory `test/glm_cmp` which contains a basic CMake file and `main.cpp`. An interested user should link or copy or clone the GLM project into this directory. The `main` function can be used to print the reference data used so others can verify behaviour in the future, or add new literal reference values.
This commit is contained in:
committed by
Tai Chi Minh Ralph Eastwood
parent
a242d83805
commit
1bce62c371
12
test/glm_cmp/CMakeLists.txt
Normal file
12
test/glm_cmp/CMakeLists.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
cmake_minimum_required(VERSION 3.17)
|
||||
project(glm_cmp LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
set(CMP_MAIN glmcmp)
|
||||
|
||||
add_subdirectory(glm)
|
||||
|
||||
add_executable(${CMP_MAIN} src/main.cpp)
|
||||
|
||||
target_link_libraries(${CMP_MAIN} PRIVATE glm)
|
||||
|
||||
Reference in New Issue
Block a user