You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository contains the source code for the OpenGL C++ course. The course teaches students how to effectively use C++ in conjunction with OpenGL to build graphical programs. The course is made in a concise manner and we refer often to external resources which we expect the student to read (or at least glance through). The learning strategy employed here is "Learning by example" and "Learning by doing". This means that example code is provided and the student is given the opportunity to practice with the material in the form of exercises.
8
-
9
-
We assume that the student is relatively comfortable reading C++ code and has some previous experience with it. The exercises are constructed in such a way that the student only has to change a few lines of code. Furthermore, we expect that the reader is familiar with matrix-vector multiplication and has some understanding of mathematics. Finally, we expect that the user is a bit familiar using the Windows command prompt.
10
-
11
-
This course focuses on running OpenGL in a Windows environment, although it should also run under Linux (we have tested it for Linux Debian). If you want to compile the programs on Linux, please read [below](#compilation-instructions-for-linux) as the instructions for CMake differ slightly. OpenGL and the libraries we are using are cross-platform and thus work on Windows, Mac OS X as well as Linux.
6
+

12
7
13
-
Feedback on this course is always much appreciated if provided in a constructive manner. Feel free to use the Issues system on Github for this purpose.
8
+
## Purpose and expectations
9
+
This repository contains the source code for the OpenGL C++ course. The course
10
+
teaches students how to effectively use C++ in conjunction with OpenGL to build
11
+
graphical programs. The course is made in a concise manner and I refer often to
12
+
external resources which I expect the student to read (or at least glance
13
+
through). The learning strategy employed here is "Learning by example" and
14
+
"Learning by doing". This means that example code is provided and the student is
15
+
given the opportunity to practice with the material in the form of exercises.
16
+
17
+
We assume that the student is relatively comfortable reading C++ code and has
18
+
some previous experience with it. The exercises are constructed in such a way
19
+
that the student only has to change a few lines of code. Furthermore, we expect
20
+
that the student is familiar with matrix-vector multiplication and has some
21
+
understanding of matrix mathematics. Finally, we expect that the student is a
22
+
bit familiar using the command line.
23
+
24
+
This course focuses on running OpenGL in a Windows environment using MinGW-w64,
25
+
although it should also run under Linux (I have tested it for Linux Ubuntu). If
26
+
you want to compile the programs on Linux, please read
27
+
[below](#compilation-instructions-for-linux) as the instructions for CMake
28
+
differ slightly. OpenGL and the libraries we are using are cross-platform and
29
+
thus work on Windows, Mac as well as Linux.
30
+
31
+
Feedback on this course is always much appreciated if provided in a constructive
32
+
manner. Feel free to use the Issues system on Github for this purpose.
14
33
15
34
## Lesson overview
16
35
1.[Compiling and running an OpenGL program](lesson01/README.md)
@@ -21,42 +40,39 @@ Feedback on this course is always much appreciated if provided in a constructive
21
40
6.[Textures](lesson06/README.md)
22
41
7.[Anaglyph](lesson07/README.md)
23
42
24
-
## Prerequisite software
25
-
In order to compile the software, you need to download and install the following packages.
26
-
27
-
*[CMake](https://cmake.org/download/) - During the installation, you need to select **Add CMAKE to the system PATH for all users**.
28
-
*[Microsoft Visual Studio Community Edition](https://visualstudio.microsoft.com/downloads/) - Use the 2019 version. Under 'Workloads', you only need to select 'Desktop Development with C++'
29
-
*[Git](https://git-scm.com/download/win) - You can use the default settings during the installation procedure.
30
-
*[Python](https://www.python.org/downloads/) - Use the latest Python 3 version!
43
+
## Preparation of compilation environment
31
44
32
-
## Dependencies
33
-
* GLFW
34
-
* Boost
35
-
* Glew
36
-
* GLM
45
+
In order to compile the software under Windows, install the the MinGW-w64
46
+
toolchain via [MSYS2](https://www.msys2.org/). Next, open **MSYS2 MinGW 64-bit**
47
+
and install using `pacman` the dependencies using the following instruction
37
48
38
-
You can easily download these dependencies by double-clicking on `download_dep.py` in the `vendor` folder. This might take a while though! Especially the compiled Boost libraries are relatively big (~300MB).
49
+
```bash
50
+
pacman -S --needed \
51
+
mingw-w64-x86_64-toolchain \
52
+
mingw-w64-x86_64-cmake \
53
+
mingw-w64-x86_64-glew \
54
+
mingw-w64-x86_64-glfw \
55
+
mingw-w64-x86_64-glm
56
+
```
39
57
40
-
## Compilation instructions for Windows
41
-
Open the `Native x64 Native Tools Command Prompt` and go to the repository root folder.
58
+
## Compilation instructions for Windows (MinGW-w64)
59
+
Open the **MSYS2 MinGW 64-bit** shell and go to the repository root folder.
42
60
43
61
Create a build directory and execute CMake; note that you need to change `XX` to the lesson of interest.
0 commit comments