Skip to content

A basic example of rendering a triangle using C++ and OpenGL

Notifications You must be signed in to change notification settings

Taardal/opengl-triangle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenGL: Hello Triangle

Description

A basic example of rendering a triangle using C++ and OpenGL.

The app creates a window using the GLFW library, loads OpenGL function pointers using the GLAD library, and renders a triangle using a simple GLSL shader and shader class.

Prerequisites :vertical_traffic_light:

Getting started :runner:

Getting the code :octocat:

  • Clone the repository: git clone https://github.com/taardal/opengl-triangle

Running the app :rocket:

  • Generate project files: cmake -S . -B build
  • Build executable from generated files: cmake --build build
  • Run the executable: ./build/opengltriangle

Resources :books:

Tools

Dependencies

  • GLFW (Window management)
  • GLAD (OpenGL initialization)

Knowledge