Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Open more actions menu

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.