-
Notifications
You must be signed in to change notification settings - Fork 64
Basic Visual Studio Code usage for all OS
Manos Kamarianakis edited this page Dec 14, 2020
·
2 revisions
- Complete the necessary steps depending on your OS.
- Download and run Visual Studio Code (https://code.visualstudio.com).
- Navigate to "View" menu and then choose "Extensions".
- Find and install the following two extensions:
- C++ extension for VS Code. Install the C/C++ extension by searching for ‘c++’ in the Extensions view.
- CMake Tools extension for VS Code. Install this extension by searching for ‘CMake tools’ in the Extensions view.
- In VS Code, click on the Explorer button (first button on the left column) and then click “Open Folder” and navigate to the glGA folder.
- Navigate to "View" menu and choose "Command Palette" and run “CMake: Select a Kit”. The extension will automatically scan for kits on your computer and create a list of compilers found on your system.
- Select the compiler of your choice (CLang 11.0.3 for Mac and Visual Studio Community 2019 Release - x86 for Windows).
- In the bottom bar of VS code (blue one), make sure that the project is in Debug mode (something like: Cmake:[Debug]:Ready).
- Click the build button in the same line.
- In the same bottom line, the build target must be [all] and the run target must be the project you wish to run.
- Click the “Debug” button (the one with the bug).
Before compiling your examples you need to decide the OpenGL version
(2.1 or 3.2 and later) as defined in each example. To do so, uncomment the
USE_OPENGL21
or USE_OPENGL32
respectively (only one of them should be active).