Notice in the OpenGL section I have version 4.4 on my machine.
If your machine is greater than 3.3 you are all set! If it is less than that, then let me know!
2. Identifying your graphics card
The GLView tool also provides information about your "Renderer" which is your graphics card.
View from the above screnshot your graphics card in the Systems Info area.
You will also see some useful information such as how much video memory (VRAM) you have available.
You can keep this in mind for later on in the semester.
3. Files - Downloading SDL
Now follow the directions to acquire SDL. I am assuming if you are on Windows, you have acquired Visual Studio 2017 with C++ installed. Please do that first. In addition, if you do not have success following my directions for whatever reason, you may try instead http://lazyfoo.net/tutorials/SDL/01_hello_SDL/index.php
You will download the SDL2-devel-2.07-VC.zip for VC++
Move the files to somewhere useful, such as a "C://SDL2.0" directory rather than your downloads folder
At this point, you have now successfully aquired the SDL libraries. Now, move on to the next step.
4. GLAD - OpenGL Extensions
Note: I have done this setup for you in the repository.
GLAD is a tool that helps us use extensions in OpenGL. An OpenGL extension is some feature or functionality that a graphics card vendor provides. In other words, extensions are released over time, and they allow us to run a variety of commands on graphics cards to improve performance, or create neat visual effects.
Some information below.
A permanent link to the 3.3 profile I generated for this course is here. I have provided GLAD in the code repository already.
If you look at glad.h, you will see that it is essentially a giant list of function pointers.
(Optional just FYI: You can generate your own profile here: GLAD webservice
(Optional) If you are still having trouble, this link may be of use:GLAD and SDL2
5. Build - Linking SDL with source
Now that we have GLAD and SDL downloaded, we are ready to try and run our program. In this section I am going to describe how to link SDL to our executable.
Create a new Visual Studio C++ Solution
Make sure that you have created a new C++ project and it is empty.
Change your configuration to x64 if you are on a 64 bit machine (very likely you are).
Right click on your project name in the Solution Explorer, then properites, then Navigate to VC++ Directories
Include the include directory from SDL
Also add the include directory from the source code we have downloaded. This includes the glad/glad.h file.
Include the lib directory from SDL under "Library Directories". Make sure to select the ones in x64.
Now navigate to the linker tab, and add 2 SDL libraries: SDL2.lib and SDL2main.lib under Input/Additional Dependencies.
These are the two libraries that live in your x64/lib file in SDl.
Under System make the SubSystem a "Console Based Project"
Move lab.cpp into your project source files (or otherwise create an empty .cpp file, name it lab.cpp, and copy the contents into it.)
Move 'glad.c' into your project source files (or otherwise create an empty .c file, name it glad.c, and copy the contents into it.)
In your lab folder, make sure to drop in the SDL2.dll where you source files and project live. SDL2.dll lives in x64/lib
Now try to run your program!
6. Video Tutorial
If the instructions above did not work for whatever reason, you can try following this video tutorial I quickly made. Again, you can also try instead http://lazyfoo.net/tutorials/SDL/01_hello_SDL/index.php (But this does not cover installing GLAD)