Browse code

Add project

Robert Cranston authored on 05/04/2021 16:43:56
Showing 1 changed files
... ...
@@ -10,6 +10,112 @@ A [C++11][] test of [OpenGL][] \>=3.2 3D [Framebuffer Objects (FBOs)][].
10 10
 [OpenGL]: https://www.opengl.org
11 11
 [Framebuffer Objects (FBOs)]: https://www.khronos.org/opengl/wiki/Framebuffer_Object
12 12
 
13
+## Dependencies
14
+
15
+Private (tests):
16
+
17
+-   [OpenGL][], system (e.g. [`libgl1-mesa-dev`][]).
18
+-   [OpenGL Extension Wrangler (GLEW)][], system (e.g. [`libglew-dev`][]).
19
+-   [OpenGL Mathematics (GLM)][], system (e.g. [`libglm-dev`][]).
20
+-   [`glshader`][], downloaded as part of the CMake configure step.
21
+-   [`gltest`][], downloaded as part of the CMake configure step.
22
+
23
+Private (transitive):
24
+
25
+-   [GLFW][], system (e.g. [`libglfw3-dev`][]).
26
+-   [`str`][], downloaded as part of the CMake configure step.
27
+
28
+[OpenGL Extension Wrangler (GLEW)]: http://glew.sourceforge.net
29
+[OpenGL Mathematics (GLM)]: https://glm.g-truc.net
30
+[GLFW]: https://www.glfw.org
31
+[`libgl1-mesa-dev`]: https://packages.debian.org/search?keywords=libgl1-mesa-dev
32
+[`libglew-dev`]: https://packages.debian.org/search?keywords=libglew-dev
33
+[`libglm-dev`]: https://packages.debian.org/search?keywords=libglm-dev
34
+[`libglfw3-dev`]: https://packages.debian.org/search?keywords=libglfw3-dev
35
+[`glshader`]: https://git.rcrnstn.net/rcrnstn/glshader
36
+[`gltest`]: https://git.rcrnstn.net/rcrnstn/gltest
37
+[`str`]: https://git.rcrnstn.net/rcrnstn/str
38
+
39
+## Build system
40
+
41
+There are several ways to use this library in a [CMake][]-based project:
42
+
43
+-   Use [`FetchContent`][] to download it and import the targets automatically
44
+    as part of the configure step:
45
+
46
+    ```cmake
47
+    include(FetchContent)
48
+    FetchContent_Declare(glfbo3d
49
+        GIT_REPOSITORY https://git.rcrnstn.net/rcrnstn/glfbo3d
50
+    )
51
+    FetchContent_MakeAvailable(
52
+        glfbo3d
53
+    )
54
+    ```
55
+
56
+-   Bundle it and import the targets with [`add_subdirectory`][].
57
+
58
+-   Use [`find_package`][] (requires that the library is [packaged](#packaging)
59
+    or [installed](#installing)).
60
+
61
+As usual, use [`target_link_libraries`][] to declare the dependency.
62
+
63
+[CMake]: https://cmake.org
64
+[`FetchContent`]: https://cmake.org/cmake/help/latest/module/FetchContent.html
65
+[`add_subdirectory`]: https://cmake.org/cmake/help/latest/command/add_subdirectory.html
66
+[`find_package`]: https://cmake.org/cmake/help/latest/command/find_package.html
67
+[`target_link_libraries`]: https://cmake.org/cmake/help/latest/command/target_link_libraries.html
68
+
69
+### Configure and generate
70
+
71
+To configure and generate a build tree, use `cmake`:
72
+
73
+```sh
74
+cmake -B build
75
+```
76
+
77
+[`cmake`]: https://cmake.org/cmake/help/latest/manual/cmake.1.html#generate-a-project-buildsystem
78
+
79
+### Build
80
+
81
+To build, use [`cmake --build`][]:
82
+
83
+```sh
84
+cmake --build build
85
+```
86
+
87
+[`cmake --build`]: https://cmake.org/cmake/help/latest/manual/cmake.1.html#build-a-project
88
+
89
+### Test
90
+
91
+To run tests, use [`ctest`][]:
92
+
93
+```sh
94
+(cd build && ctest --verbose)
95
+```
96
+
97
+[`ctest`]: https://cmake.org/cmake/help/latest/manual/ctest.1.html
98
+
99
+### Package
100
+
101
+To package, use [`cpack`][]:
102
+
103
+```sh
104
+(cd build && cpack)
105
+```
106
+
107
+[`cpack`]: https://cmake.org/cmake/help/latest/manual/cpack.1.html
108
+
109
+### Install
110
+
111
+To install onto the current system, use [`cmake --install`][]:
112
+
113
+```sh
114
+cmake --install build
115
+```
116
+
117
+[`cmake --install`]: https://cmake.org/cmake/help/latest/manual/cmake.1.html#install-a-project
118
+
13 119
 ## License
14 120
 
15 121
 Licensed under the [ISC license][] unless otherwise noted, see the
Browse code

Add license

Robert Cranston authored on 15/05/2021 11:24:21
Showing 1 changed files
... ...
@@ -9,3 +9,10 @@ A [C++11][] test of [OpenGL][] \>=3.2 3D [Framebuffer Objects (FBOs)][].
9 9
 [C++11]: https://en.wikipedia.org/wiki/C++11
10 10
 [OpenGL]: https://www.opengl.org
11 11
 [Framebuffer Objects (FBOs)]: https://www.khronos.org/opengl/wiki/Framebuffer_Object
12
+
13
+## License
14
+
15
+Licensed under the [ISC license][] unless otherwise noted, see the
16
+[`LICENSE`](LICENSE) file.
17
+
18
+[ISC license]: https://choosealicense.com/licenses/isc/
Browse code

Add readme

Robert Cranston authored on 07/04/2021 05:13:40
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,11 @@
1
+# [`glfbo3d`][]
2
+
3
+A [C++11][] test of [OpenGL][] \>=3.2 3D [Framebuffer Objects (FBOs)][].
4
+
5
+[`glfbo3d`][] consists of a single test that demonstrates usage of 3D
6
+[Framebuffer Objects (FBOs)][].
7
+
8
+[`glfbo3d`]: https://git.rcrnstn.net/rcrnstn/glfbo3d
9
+[C++11]: https://en.wikipedia.org/wiki/C++11
10
+[OpenGL]: https://www.opengl.org
11
+[Framebuffer Objects (FBOs)]: https://www.khronos.org/opengl/wiki/Framebuffer_Object