This project is my journey through learning a OpenGL Graphics API. Building and trying to build game engine.
- Windows or Linux OS
- Visual Studio Code (version 1.60 or later)
- Microsoft Visual Studio Build Tools (version 2019 or later) for Windows
- vcpkg package manager (latest version)
-
Install Visual Studio Build Tools:
- Download and install Microsoft Visual Studio Build Tools.
-
Install vcpkg, GLFW, and GLAD:
-
Run the provided
install.bat
script to install vcpkg, GLFW, and GLAD:.\install.bat
-
-
Add Required Paths to Environment Variables:
-
Depending on your installed versions of Visual Studio, Windows Kits, and MSVC, you need to add the appropriate paths to your
PATH
environment variable. Here are some examples:-
For Visual Studio 2022 Community:
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\<version>\bin\Hostx64\x64
C:\Program Files (x86)\Windows Kits\10\bin\<version>\x64
C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\VC\VCPackages
-
For Visual Studio 2019 Build Tools:
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\<version>\bin\Hostx64\x64
C:\Program Files (x86)\Windows Kits\10\bin\<version>\x64
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\Common7\IDE\VC\VCPackages
-
For vcpkg:
C:\Users\<your-username>\vcpkg\installed\x64-windows\bin
Replace
<version>
with the actual version numbers installed on your system. You can find these versions by navigating to the respective directories. -
-
-
Start Visual Studio Code through Developer PowerShell/Console:
-
Open Developer PowerShell or Developer Command Prompt for Visual Studio.
-
Navigate to your project directory and start Visual Studio Code:
code .
-
-
Configure Visual Studio Code:
- The .vscode directory and its configuration files are already provided in the project.
-
Copy Required DLLs:
- Copy glfw3.dll from
C:/Users/<your-username>/vcpkg/installed/x64-windows/bin
to the directory where your executable (main.exe
) is located.
- Copy glfw3.dll from
-
Write Your OpenGL Code
-
Build and Run:
- Open Visual Studio Code.
- Open the terminal in Visual Studio Code and run the build task by pressing
Ctrl+Shift+B
. - Run the generated executable (
main.exe
).
-
Install vcpkg, GLFW, and GLAD:
-
Run the provided install.sh script to install vcpkg, GLFW, and GLAD:
./install.sh
-
-
Configure Visual Studio Code:
- The .vscode directory and its configuration files are already provided in the project.
-
Write Your OpenGL Code
-
Build and Run:
-
You can use the provided build.makefile to build and install the project:
-
Open a terminal and navigate to your project directory.
-
Run the following commands:
make -f build.makefile build
-
-
Open Visual Studio Code.
-
Open the terminal in Visual Studio Code and run the build task by pressing
Ctrl+Shift+B
. -
Run the generated executable (
main
).
-
This project is licensed under the MIT License.