From 5a9593d9bc6871aa31281fc096b543403283d7f8 Mon Sep 17 00:00:00 2001 From: Recep Aslantas Date: Mon, 27 Apr 2020 22:30:52 +0300 Subject: [PATCH] update docs --- docs/source/build.rst | 40 ++++++++++++++++++++++++++++++++++++++++ docs/source/features.rst | 7 +++++-- 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/docs/source/build.rst b/docs/source/build.rst index c62fe0c..137ea1a 100644 --- a/docs/source/build.rst +++ b/docs/source/build.rst @@ -7,6 +7,46 @@ Build cglm If you only need to inline versions, you don't need to build **cglm**, you don't need to link it to your program. Just import cglm to your project as dependency / external lib by copy-paste then use it as usual +CMake (All platforms): +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: bash + :linenos: + + $ mkdir build + $ cd build + $ cmake .. # [Optional] -DCGLM_SHARED=ON + $ make + $ sudo make install # [Optional] + +**make** will build cglm to **build** folder. +If you don't want to install **cglm** to your system's folder you can get static and dynamic libs in this folder. + +**CMake Options:** + +.. code-block:: CMake + :linenos: + + option(CGLM_SHARED "Shared build" ON) + option(CGLM_STATIC "Static build" OFF) + option(CGLM_USE_C99 "" OFF) # C11 + option(CGLM_USE_TEST "Enable Tests" OFF) # for make check - make test + +**Use with your CMake project example** + +.. code-block:: CMake + :linenos: + + cmake_minimum_required(VERSION 3.8.2) + + project() + + add_executable(${PROJECT_NAME} src/main.c) + target_link_libraries(${LIBRARY_NAME} PRIVATE + cglm) + + add_subdirectory(external/cglm/) + Unix (Autotools): ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/source/features.rst b/docs/source/features.rst index 69e8cd1..8720a97 100644 --- a/docs/source/features.rst +++ b/docs/source/features.rst @@ -1,10 +1,11 @@ Features ================================================================================ +* array api and struct api, you can use arrays or structs. * general purpose matrix operations (mat4, mat3) * chain matrix multiplication (square only) * general purpose vector operations (cross, dot, rotate, proj, angle...) -* affine transforms +* affine transformations * matrix decomposition (extract rotation, scaling factor) * optimized affine transform matrices (mul, rigid-body inverse) * camera (lookat) @@ -20,4 +21,6 @@ Features * easing functions * curves * curve interpolation helpers (SMC, deCasteljau...) -* and other... +* helpers to convert cglm types to Apple's simd library to pass cglm types to Metal GL without packing them on both sides +* ray intersection helpers +* and others...