OpenGL 2D game written in C++
sudo apt install libglfw3 libglfw3-dev
sudo apt install libglew-dev
sudo apt install libsdl2-dev libsdl2-mixer-dev
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON . -B build
Write simple OpenGL code to draw a triangle to test that OpenGL works.
/* Render here */
glClear(GL_COLOR_BUFFER_BIT);
// Draw triangle to test OpenGL works
glBegin(GL_TRIANGLES);
glVertex2f(-0.5f, -0.5f);
glVertex2f(0.0f, 0.5f);
glVertex2f(0.5f, -0.5f);
glEnd();
/* Swap front and back buffers */
glfwSwapBuffers(window);
Install clang-tidy
sudo apt install clang-tidy