Synodic-Software / Soul-Engine

Physically based renderer and simulation engine for real-time applications.
GNU General Public License v3.0
42 stars 24 forks source link

Step 1: Download + Link Libraries #138

Closed Behemyth closed 6 years ago

Behemyth commented 6 years ago

Here are the libraries you will have to download and link your project to


GLFW

This is the cross-platform window utility. It is the most minimal library available for this purpose. It handles some OpenGL startup utilities, so it will make the next issue easier for you.

As you have learned from Data Structures, you compile your code. If you plan to distribute your code as a library, you can compile your code into a .lib file or a .dll. The user would then link to that library, allowing it access to your code. The compiled code MUST match your machine, however, as every OS/Compiler produces a different .lib/.dll. The user then would include your header file so they know what the .lib or .dll contains and thus can use it in their own code.

You can either download the binaries from their website, http://www.glfw.org/download.html, for your machine OR You can clone the library from Github, and compile the binaries yourself using CMake

Google is your friend. Example searches can be, 'Visual Studio GLFW Linking' or 'Compile CMake command line'. If you need more help, reach out to the team on Slack. Let use work on this together!


GLAD/GLEW or something else

The next step is setup the OpenGL bindings for your machine. There are many ways to do this and they are best explained by online resources (see the next section).

The most modern and simplest way at the moment is to use GLAD http://glad.dav1d.de/


The most comprehensive tutorial on this subject that I have found is here: https://learnopengl.com/Getting-started/Creating-a-window It specifically uses Visual Studio, but you can replace these steps based on your build environment.


Finally, make sure the following works: