l-oneil / LearningOpenGL

Repository capturing code used to explore the OpenGL API. Written to run on M1 Macbook Air.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LearningOpenGL on M1 Mac

This is just a collection of useful information and experiences with Learning OpenGL from: https://learnopengl.com/

Third Party Software

How to install GLFW

    $ git clone git@github.com:glfw/glfw.git
    $ cd glfw 
    $ mkdir build && cd build 
    $ cmake -GNinja -DCMAKE_OSX_ARCHITECTURES=arm64
    $ ninja 
    $ ninja install

Generating GLAD Library

  1. Go to: https://glad.dav1d.de/
  2. Select: C++, OpenGL, gl v3.3, tick "Generate Loader"
  3. Click generate
  4. Download glad.zip

How to install GLM (OpenGL Mathematics)

    $ git clone git@github.com:g-truc/glm.git

Header only, so no compilation required, just need to include through CMake:

    set(glm_DIR <path to glm root>/cmake/glm) # if necessary
    find_package(glm REQUIRED)
    target_link_libraries(<your executable> glm::glm)

STB Image

    $ wget https://raw.githubusercontent.com/nothings/stb/master/stb_image.h

ImGui

Location: https://github.com/ocornut/imgui

About

Repository capturing code used to explore the OpenGL API. Written to run on M1 Macbook Air.


Languages

Language:C++ 82.8%Language:GLSL 15.5%Language:CMake 1.7%