Skip to content

A Simple OpenGL tutorial to learn the basics of 2D and 3D rendering.

Notifications You must be signed in to change notification settings

daniel752/opengl-tutorial

Repository files navigation

OpenGL Tutorial

I Have created this directory for my studies in OpenGL, so anyone who wants to learn the basics of OpenGL is welcome to use this directory. I Wrote the code in Visual Code in a Linux Ubuntu environment, so the environment is all configured and setup for Linux users on that end 😄. Windows users have Visual Studio so don't worry about it. I Used CMake to build all the mini projects (directories) and it's super easy to learn and use so it's another thing you can learn from this directory, it should work on any operating system, if not open an issue and i'll fix it.

Clone Repository

From the terminal run one of the options:

  • HTTPS: git clone https://github.com/daniel752/opengl-tutorial.git
  • SSH: git@github.com:daniel752/opengl-tutorial.git

Build And Run Executable

Build

  • From the root directory for that specific tutorial ([path]/opengl-tutorial/draw-shape/, [path]/opengl-tutorial/init-window/, etc) run:
    mkdir build && cd build
  • After build directory was created run:
    cmake ..
  • After that cmake will generate a Makefile in build/ directory,from build/ directory run:
    make

Run

From the 'build/' directory run:
./main.o